Граф коммитов

53560 Коммитов

Автор SHA1 Сообщение Дата
Bogdan Postelnicu 893df6829d Bug 1238917 - initialize lazySticky in clear function. r=jorendorff@mozilla.com
--HG--
extra : rebase_source : f2e7559dd52be95a7cd7ff7e4946717fc9e49378
2016-01-12 14:12:11 +02:00
Jon Coppeard 461e16de02 Bug 1253461 - Fix race condition in Shape::fixupDictionaryShapeAfterMovingGC r=terrence 2016-03-08 17:14:34 +00:00
Mike Hommey e6d395b495 Bug 1254873 - Make --disable-js-shell the default for non-js-standalone builds. r=chmanchester
The implementation is a bit circumvoluted, but we do need to share
options between the top-level and js/src configures, possibly with
different defaults, and to properly pass things down from one to
the other. Until we are further down the road and can actually merge
both configures, this is a necessary evil.
2016-03-10 13:54:02 +09:00
Mike Hommey 06634bfcb4 Bug 1251324 - Add a --disable-js-shell option to js/src/configure. r=chmanchester 2016-03-10 13:54:02 +09:00
Boris Zbarsky 692754b232 Bug 1255192 part 2. Clean up the JSContext usage around xpc::FindExceptionStackForConsoleReport now that it just needs a JSContext for rooting. r=bholley 2016-03-09 22:27:14 -05:00
Boris Zbarsky 891b63eeba Bug 1255192 part 1. Remove the JSContext argument of JS::ExceptionStackOrNull. r=bholley 2016-03-09 22:27:13 -05:00
Boris Zbarsky 36d4079be7 Bug 1254847 part 3. Make AutoEntryScript always take ownership of error reporting. r=bholley 2016-03-09 19:02:03 -05:00
Boris Zbarsky 0f63c48348 Bug 1254847 part 1. Take ownership of error reporting on the AutoEntryScript in nsXPCWrappedJSClass::DelegatedQueryInterface. r=bholley
If a QI method throws anything other than NS_NOINTERFACE, we should just report
it and propagate NS_NOINTERFACE out to callers.  And if it throws
NS_NOINTERFACE, then we already clear the pending exception in
nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject, then turn the null return
value into a C++ NS_NOINTERFACE return.
2016-03-09 19:02:03 -05:00
Luke Wagner ee4712ee86 Bug 1253137 - Baldr: switch from LEB128 to prefix-based scheme to match BinaryEncoding.md (r=sunfish)
MozReview-Commit-ID: HwLEk9HKW50

--HG--
extra : rebase_source : f2cc1884affc2a2b45631ac7dc5e28961c6755b9
2016-03-09 13:14:14 -06:00
Luke Wagner 994ae222fd Bug 1254836 - Baldr: handle over-recursion in validator (r=bbouvier)
MozReview-Commit-ID: DgKF326PlIc

--HG--
extra : rebase_source : 8ac7975d086ad8ec7c6eee7f5954ee31f1b0d4df
2016-03-09 11:11:50 -06:00
Luke Wagner 2126d2b2ba Bug 1254188 - Baldr: handle recycled phis when closing a loop with a value (r=bbouvier)
MozReview-Commit-ID: D7c4b6cQvCK

--HG--
extra : rebase_source : 270b462db9bec1f78a8f60fb6356b5ea45b58387
2016-03-09 11:08:01 -06:00
Boris Zbarsky 2e279c21e5 Bug 1254857. Switch the AutoEntryScript in xpc::EvalInSandbox to take ownership of error reporting. r=bholley
In practice we always propagate the exception out anyway, so this change is a no-op.
2016-03-09 15:28:54 -05:00
Boris Zbarsky bf71c8ea5b Bug 1254848 part 3. Take ownership of error reporting on the AutoEntryScript in AsyncScriptLoader::OnStreamComplete. r=bholley
There is no one else who cares about an exception left on the JSContext here: we're coming in off the event loop.
2016-03-09 15:28:42 -05:00
Boris Zbarsky 9c955ac670 Bug 1254848 part 2. Take ownership of error reporting on the AutoEntryScript in mozJSComponentLoader::PrepareObjectForLocation. r=bholley
This is only used for calling JS_FireOnNewGlobalObject, which never throws.
2016-03-09 15:28:41 -05:00
Boris Zbarsky 731f2ec68f Bug 1254848 part 1. Take ownership of error reporting on the AutoEntryScript in mozJSComponentLoader::ObjectForLocation. r=bholley
The code as it stood is a bit weird.  It sets up an AutoJSAPI that takes
ownership of error reporting.  Then later it also sets up an
AutoEntryScript... but keeps using the JSContext it got from the AutoJSAPI.
It's not obvious that there is any guarantee that this matches the JSContext
from the AutoEntryScript!

So we go ahead and change the things that are nominally using the
AutoEntryScript to use it JSContext and take ownership of error reporting on it
explicitly.  If the JSContext is the same as that of the AutoJSAPI, then we were
getting backstopped by its taking ownership of error reporting anyway.  If it's
not, we don't want to leave exceptions dangling on it.
2016-03-09 15:28:33 -05:00
Boris Zbarsky d0363ce0e6 Bug 1254846. Add an AutoEntryScript constructor that takes a JSObject instead of an nsIGlobalObject, for convenience. r=bholley 2016-03-09 15:28:26 -05:00
Jim Blandy 595069840a Bug 1179278: GDB pretty-printers: handle encoding errors when trying to print JSObject class names. DONTBUILD r=jorendorff
--HG--
extra : rebase_source : b463225bc35fe7f8e2848e20578362e1bfa8bde3
2015-06-30 23:47:14 -07:00
Mike Shal 053369e67e Bug 1253431 part 7 - Remove SDK_BINARY; r=gps
MozReview-Commit-ID: 4RmjsX966Qh

--HG--
extra : rebase_source : 0d9d94ed98ae8f1cfb9d5787edc1336ce1ee6785
2016-03-03 14:23:57 -05:00
Mike Shal 4bd051f9d7 Bug 1253431 part 6 - Remove SDK_BINARY from js/src; r=gps
It has no effect anyway, since it is set after including config/rules.mk

MozReview-Commit-ID: LfxwCLRl99i

--HG--
extra : rebase_source : 27c4765bf954dac71b6cad01639ad6c4fcbab5bb
2016-03-03 13:46:20 -05:00
Jon Coppeard 6f6aece93c Backed out changeset 818e0d0ecbcc (bug 1254108) for performance regression on splay 2016-03-09 15:37:22 +00:00
Till Schneidereit dc24ad50e8 Bug 1254968 - Add support for running JS builtins' constructors over Xray wrappers without unwrapping the newTarget. r=bholley,f=bz 2016-02-10 23:09:13 +01:00
Till Schneidereit f8c3aa8993 Bug 1254966 - Disambiguate JS Telemetry macro names. r=evilpie 2016-03-09 14:25:13 +01:00
Heiher 2d2692061c Bug 1254808 - IonMonkey: MIPS: Define JS_USE_LINK_REGISTER on MIPS. r=h4writer
---
 js/src/jit/MacroAssembler.h                           |  8 ++++----
 js/src/jit/SharedIC.cpp                               |  3 +--
 js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | 14 ++++----------
 js/src/jit/mips32/Trampoline-mips32.cpp               |  7 +++++++
 js/src/jit/mips64/Trampoline-mips64.cpp               |  7 +++++++
 js/src/jit/shared/Assembler-shared.h                  |  3 ++-
 6 files changed, 25 insertions(+), 17 deletions(-)
2016-03-09 19:07:52 +08:00
Heiher bd60a663fc Bug 1254808 - IonMonkey: Factor MacroAssembler::popReturnAddress on ARM. r=nbp
---
 js/src/jit/CodeGenerator.cpp              | 2 +-
 js/src/jit/MacroAssembler.h               | 1 +
 js/src/jit/arm/MacroAssembler-arm.cpp     | 6 ++++++
 js/src/jit/arm64/MacroAssembler-arm64.cpp | 6 ++++++
 4 files changed, 14 insertions(+), 1 deletion(-)
2016-03-09 19:07:51 +08:00
Jon Coppeard 47819adf25 Bug 1254108 - Delay updating of GC trigger threshold until end of GC r=terrence 2016-03-09 10:15:10 +00:00
Nick Fitzgerald 8cdfc57103 Bug 1254105 - Avoid passing magic values to the error reporter machinery in the ShortestPaths testing function; r=jimb
The error reporting machinery will try and stringify any value you pass it, and
stringifying asserts that we don't pass magic values. Easiest solution is to
just hard code the error message, since this is a testing-only function.

--HG--
extra : rebase_source : d096a2cd2f697533279c5b33cbe5de3c5a2513a9
2016-03-08 16:33:00 +01:00
Terrence Cole f179579502 Bug 1224038 - Part 2: Use stable hashing for NewTable; r=sfink
--HG--
extra : rebase_source : 87d9e72f65e5ff7afc15d7a6062f789e9fbd9408
2016-01-22 10:41:43 -08:00
Terrence Cole f5c3cac3ba Bug 1224038 - Part 1: Add infallible versions of uid and hashcode getters; r=sfink
--HG--
extra : rebase_source : 5cc9c195abd671ce06ba196b7da7c7b8c29fde08
2016-01-22 10:41:39 -08:00
Hannes Verschore 6f6428dad2 Bug 1254528: IonMonkey - Check slot before removing load with value of store, r=nbp 2016-03-09 02:22:17 -05:00
Jim Blandy 629fcdc697 Bug 1254384: Remove support for ion-eager, baseline-eager, and dump-bytecode from js/src/jit-test harness. r=nbp
--HG--
extra : rebase_source : acb308d6a2809744080f0d52d509083790a5d9dd
2016-03-07 18:23:10 -08:00
Jim Blandy b450cd68c7 Bug 1254384: Use generic shell switch syntax in js/src/jit-test tests. r=nbp
--HG--
extra : rebase_source : bc23497ccd5f42f80b44d45ea75e30e7dc5c6f29
2016-03-07 18:24:32 -08:00
Heiher 54ab7fb9f0 Bug 1254369 - IonMonkey: MIPS: Clean up broken assertions. r=arai
---
 js/src/jit/mips-shared/Lowering-mips-shared.cpp | 2 --
 1 file changed, 2 deletions(-)
2016-03-09 12:34:59 +08:00
Heiher 0d2e971cf1 Bug 1254369 - IonMonkey: MIPS: Fix ma_b(Register, Imm32, wasm::JumpTarget) missing. r=arai
---
 js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | 3 +++
 1 file changed, 3 insertions(+)
2016-03-09 12:34:58 +08:00
Heiher 1c1b0ea281 Bug 1254369 - IonMonkey: MIPS: Fix header files missing in MacroAssembler. r=arai
---
 js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | 2 ++
 js/src/jit/mips-shared/MacroAssembler-mips-shared.h   | 4 ++++
 js/src/jit/mips32/MacroAssembler-mips32.h             | 1 -
 js/src/jit/mips64/MacroAssembler-mips64.h             | 1 -
 4 files changed, 6 insertions(+), 2 deletions(-)
2016-03-09 12:34:57 +08:00
Terrence Cole 0037d3617c Backed out changset a701a038de28 (bug 1224038) for breaking SM tests.
--HG--
extra : rebase_source : c987969c08cb55ee76cf0a88fd60594ba22a766f
2016-03-08 20:06:49 -08:00
Terrence Cole 233d8e3b94 Backed out changeset 33a1af83a77f (bug 1224038) for breaking SM tests.
--HG--
extra : rebase_source : f28bbe20e879206562e01bc97d8f8317629043bc
2016-03-08 20:06:10 -08:00
Ryan VanderMeulen 0647ba5d93 Bug 1251855 - Adjust expected results if RELEASE_BUILD is set. r=bz
--HG--
extra : rebase_source : e42a352a0a3e50408e0e8e09e7594416bf26cd3d
2016-03-05 16:41:44 -05:00
Luke Wagner 51580c63a7 Bug 1253137 - Baldr: update encoding of memory access immediates (r=sunfish)
MozReview-Commit-ID: L4rMuB0VGxd

--HG--
extra : rebase_source : 2ddff129b277708d8ca4ee424e8e9ce3cc28bc01
2016-03-08 19:31:06 -06:00
Luke Wagner ced60ee7e8 Bug 1253137 - Baldr: update encoding of br_table branch targets (r=sunfish)
MozReview-Commit-ID: 8K2L3giOgNT

--HG--
extra : rebase_source : e822d78ba9e66cf2984e074e11c8e053442ef1fc
2016-03-08 19:31:03 -06:00
Terrence Cole 2c2a5c3fc6 Bug 956899 - Move and rename rust-alike Mutex to ExclusiveData; r=fitzgen
--HG--
rename : js/src/jsapi-tests/testMutex.cpp => js/src/jsapi-tests/testThreadingExclusiveData.cpp
rename : js/src/vm/Mutex.cpp => js/src/threading/ExclusiveData.cpp
rename : js/src/vm/Mutex.h => js/src/threading/ExclusiveData.h
extra : rebase_source : 7205e2bc1b085557113b9b61e2356cd53e6154a8
2016-03-03 11:15:53 -08:00
Terrence Cole a4aa15ddff Bug 1224038 - Part 2: Use stable hashing for NewTable; r=sfink
--HG--
extra : rebase_source : 03157a3dcd4b2f9eb26fd33cb7bdb9805bbcb5fb
2016-01-22 10:41:43 -08:00
Terrence Cole 8772e89937 Bug 1224038 - Part 1: Add infallible versions of uid and hashcode getters; r=sfink
--HG--
extra : rebase_source : e8fe5b27e89f31a61192025599fdeff4c3778e61
2016-01-22 10:41:39 -08:00
Boris Zbarsky 8db444c416 Bug 1254393. Take ownership of error reporting on the AutoEntryScript in nsXPCWrappedJSClass::CallMethod. r=bholley
There are several cases to consider in terms of where exceptions might come from
here:

1)  We could have an exception on the JSContext already when we set up the
AutoEntryScript.  In practice this does not happen, and once this change is made
we will add an assert to that effect in AutoJSAPI::InitInternal.  See bug 1112920.

2)  We could have an exception thrown by the XPCCallContext constructor, but it
never does that when initialized, as here, without a JSObject*.

3)  We can have an exception thrown by CallMethod itself, if the callee method
wants a JSContext or optional argc.  This patch switches that to using
CheckForException, which means it will behave exactly like exceptions thrown
from the actual implementation of the method we're calling in terms of how it's
reported and whether it's rethrown to callers, if any.

4)  We can have exceptions thrown various places (e.g. during argument and
retval/outparam conversions) after this point, but those are all under the scope
of the AutoScriptEvaluate, whose destructor will restore the JSContext state to whatever it
was when the AutoScriptEvaluate was created.  Since the AutoScriptEvaluate goes
out of scope before the AutoEntryScript does, there will be no dangling
exception on the JSContext at that point.

5)  We can have exceptions thrown by the actual method call.  Those are
reported, as needed, via CheckForException, and will continue to be so reported.

So in general there are two behavior changes here:

* We now treat the "callee wants JSContext or argc" case as the same as an
  exception from the callee, which is not what we used to do.

* If the object we're calling comes from an inner window whose outer window has
  been torn down, we will now correctly report the exception against that inner
  window.  Before this patch, what happend is that we would init the
  AutoEntryScript with the inner window, but FindJSContext would not find an
  nsIScriptContext on it (since its outer has been torn down), so we would use
  the safe JS context.  Then in xpc::SystemErrorReporter we would check for a
  window associated with the JSContext, not find one, check for an addon sandbox
  current compartment, see we're not in one, and then use the privileged junk
  scope for its error reporting.  The new setup in AutoJSAPI::ReportError checks
  for the current compartent being a window, which of course it is.
2016-03-08 17:21:40 -05:00
Boris Zbarsky 3e5ab54341 Bug 1254230 kinda-fix. Make sure to never send script errors with stacks attached to the console service if the associated windows have already had FreeInnerObjects called on them. r=bholley 2016-03-08 17:21:40 -05:00
Boris Zbarsky 81b9b7ac71 Bug 1254380 part 2. Go ahead and log the stack from our exception in AutoJSAPI::ReportException even if we don't have a window. r=bholley 2016-03-08 17:21:40 -05:00
Boris Zbarsky 3d39097c61 Bug 1254293. Fix dom::GetArrayIndexFromId to actually follow the spec for large indices (i.e. ones that don't fit in in int32_t). r=peterv 2016-03-08 17:21:40 -05:00
Mike Hommey 564de8ea0e Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester
Because --enable-application is the current way to do things, transpose
it to configure.py, but since --enable-application=js doesn't make
sense, make it an alias of a new --enable-project option.

This only partially moves --enable-application out of old-configure.in
because there are a lot of other things intertwined with it.
2016-03-09 09:23:27 +09:00
Luke Wagner 7d969808ef Bug 1253137 - Baldr: put exports object onto .exports field of instance object (r=sunfish)
MozReview-Commit-ID: 1OgqSFrJsE4
2016-03-07 16:03:04 -06:00
Luke Wagner 6d028662d6 Bug 1253137 - Baldr: add explicit function body count (r=sunfish)
MozReview-Commit-ID: ISyUFSin5Jg
2016-03-08 13:15:29 -06:00
Luke Wagner d86a46e938 Bug 1253137 - Baldr: fold if_else into if to match ml-proto (r=sunfish)
MozReview-Commit-ID: JdGRFVzGWbN
2016-03-08 13:15:09 -06:00