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

69069 Коммитов

Автор SHA1 Сообщение Дата
Tooru Fujisawa 3469b17a67 Bug 1518391 - Part 4: Use pn_u.function.syntaxKind instead of pn_op for FunctionNode. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D18329

--HG--
extra : moz-landing-system : lando
2019-02-05 14:59:11 +00:00
Tooru Fujisawa 2f0e1b5e4e Bug 1518391 - Part 3: Add pn_u.function.syntaxKind for FunctionNode. r=jorendorff
This is a replacement for pn_op that is used in BytecodeEmitter.
This patch just adds the field, but keeps using pn_op.
Part 4 removes the usage of pn_op for FunctionNode.

Differential Revision: https://phabricator.services.mozilla.com/D18328

--HG--
extra : moz-landing-system : lando
2019-02-05 14:58:42 +00:00
Tooru Fujisawa 43929c139f Bug 1518391 - Part 2: Separate CodeNode into FunctionNode and ModuleNode. r=jorendorff
CodeNode was shared between ParseNodeKind::Function and ParseNodeKind::Module,
but Module only uses `pn_u.code.body`.
Separated them for further refactoring for function part.

Differential Revision: https://phabricator.services.mozilla.com/D18327

--HG--
extra : moz-landing-system : lando
2019-02-05 14:58:17 +00:00
Tooru Fujisawa 24c65d0fc6 Bug 1518391 - Part 1: Remove unused case/code from function node ops. r=jorendorff
pn_op for CodeNode can only be JSOP_NOP, JSOP_LAMBDA, and JSOP_LAMBDA_ARROW.
Removed other cases.
Also removed the override with JSOP_FUNWITHPROTO given the field is never read
after the function.

Differential Revision: https://phabricator.services.mozilla.com/D18325

--HG--
extra : moz-landing-system : lando
2019-02-05 14:57:47 +00:00
Mike Hommey 029e8b5700 Bug 1524461 - Run the clock_gettime(CLOCK_MONOTONIC) configure check on OSX. r=froydnj
That will make it detected when we bump the MACOSX_DEPLOYMENT_TARGET
to a value >= 10.12.

Differential Revision: https://phabricator.services.mozilla.com/D18310

--HG--
extra : moz-landing-system : lando
2019-02-04 23:26:34 +00:00
Coroiu Cristina 667401357b Merge mozilla-central to autoland a=merge on a CLOSED TREE 2019-02-04 23:47:17 +02:00
Coroiu Cristina 98926c4646 Merge inbound to mozilla-central a=merge 2019-02-04 23:42:26 +02:00
Tooru Fujisawa dd11979649 Bug 1524969 - Use 2-spaces indent in BinSource.yaml. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D18551

--HG--
extra : moz-landing-system : lando
2019-02-04 20:46:02 +00:00
Sylvestre Ledru 14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D18488

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Bogdan Tara c39a332eaa Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-02-04 19:39:48 +02:00
Jon Coppeard 1add144308 Bug 1522204 - Add profiler label for gray unmarking r=mstange 2019-02-04 10:55:11 +00:00
Brindusan Cristian 0e637b692d Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-02-03 23:45:10 +02:00
Denis Palmeiro ad385bf56a Bug 1384808 - Implement a linear cache for searching the shape lineage r=djvj
Linearly searching the shape lineage can be expensive.  It is going to cause branch misses and cache misses since we are traversing a linked list.  Since this is done frequently enough, it may be worth while to "cache" results from the linear search.  This revision hopes to lazily allocate a small linear cache after the first linear search on a shape.  The results from each linear search afterwards will be placed into the cache.  If the jsid that is being searched for is frequently looked up then we obtain a "cache hit" from a quick search in the cache.  Otherwise, we fall back to a linear search and append the new entry to the cache.  Once the cache is full, it will transform into a shape hash table like the previous approach.

Differential Revision: https://phabricator.services.mozilla.com/D12155

--HG--
extra : moz-landing-system : lando
2019-02-03 00:03:35 +00:00
Jan de Mooij d9d405b919 Bug 1522837 part 4 - Implement JSOP_CALLSITEOBJ in BaselineInterpreterCodeGen. r=tcampbell
This is just a VM call in the interpreter. We could optimize this with an IC or
inline path if it ever becomes a problem.

Differential Revision: https://phabricator.services.mozilla.com/D17935

--HG--
extra : moz-landing-system : lando
2019-02-03 10:08:41 +00:00
Jan de Mooij 1f750cdfb7 Bug 1522837 part 3 - Refactor JSOP_OBJECT in BaselineCodeGen. r=tcampbell
This adds js::SingletonObjectLiteralOperation and calls it from both the
interpreter and Baseline. The Baseline compiler still has a fast path for the
cloning-not-necessary case.

Differential Revision: https://phabricator.services.mozilla.com/D17934

--HG--
extra : moz-landing-system : lando
2019-02-03 10:07:31 +00:00
Jan de Mooij ae765c9ac3 Bug 1522837 part 2 - Implement subtractScriptSlotsSize, loadGlobalLexicalEnvironment, loadGlobalThisValue, pushScriptArg. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D17645

--HG--
extra : moz-landing-system : lando
2019-02-03 10:07:01 +00:00
Jan de Mooij aa34bcb168 Bug 1522837 part 1 - Implement loadScript, emitInitializeLocals, storeFrameSizeAndPushDescriptor for BaselineInterpreterHandler. r=djvj
This also removes computeFullFrameSize because we don't really need it.

Differential Revision: https://phabricator.services.mozilla.com/D17644

--HG--
extra : moz-landing-system : lando
2019-02-03 10:06:39 +00:00
Ciure Andrei 9c86f4019d Backed out 2 changesets (bug 1471496) for causing CycleCollectedJSRuntime.cpp perma failures CLOSED TREE
Backed out changeset 9658187a54fb (bug 1471496)
Backed out changeset 2ff333373fe4 (bug 1471496)
2019-02-02 20:44:08 +02:00
Bob Clary 5e07455d7b Bug 1524352 - [jittest] Improve ADBProcessError messages in run_test_remote, r=gbrown. 2019-02-04 09:45:28 -08:00
Jon Coppeard 6ab95aed88 Bug 1520783 - Check whether the path passed to createMappedArrayBuffer() is a regular file. r=sfink
--HG--
extra : histedit_source : 80f8a356833d5dd92e4084da17e9565750301fde
2019-02-01 02:07:00 +02:00
Boris Zbarsky 10ed8acc81 Bug 1471496 part 2. Change the way we do cross-compartment wrappers for Window and Location so they don't ever need to be recomputed. r=bholley
The end result we want is that on the web cross-compartment wrappers for
WindowProxy and Location are always CrossOriginObjectWrapper.  That needs to be true
for both cases that are different-origin (as now) and cases that are
same-origin, since they might become different-origin due to document.domain
changes but we don't want that to affect the wrappers involved.

On the web, all security checks are symmetric, so in WrapperFactory::Rewrap we
would have originSubsumesTarget == targetSubsumesOrigin in all web cases.

I claim that

  originSubsumesTarget == targetSubsumesOrigin &&
  (!targetSubsumesOrigin ||
   (!originCompartmentPrivate->wantXrays &&
    !targetCompartmentPrivate->wantXrays)) &&
  "object is a WindowProxy or Location"

is a necessary and sufficient condition for using CrossOriginObjectWrapper.

Comparing to our current code, if originSubsumesTarget and targetSubsumesOrigin
are both false, then for the WindowProxy and Location cases we currently end up
with the following arguments to SelectWrapper:

  securityWrapper: true
  xrayType: XrayForDOMObject
  waiveXrays: false

So SelectWrapper ends up returning CrossOriginObjectWrapper, which the new
condition keeps doing.

If originSubsumesTarget and targetSubsumesOrigin are both true, then there are
two cases.  If both compartments have wantXrays false (which is always the case
on the web), then we end up with the following arguments to SelectWrapper:

  securityWrapper: false
  xrayType: NotXray
  waiveXrays: false

and SelectWrapper returns CrossCompartmentWrapper.  We want to do
CrossOriginObjectWrapper instead, as explained above.

Finally, if originSubsumesTarget and targetSubsumesOrigin are both true but one
of the compartments has wantXrays set, then we get:

  securityWrapper: false
  xrayType: XrayForDOMObject
  waiveXrays: might be true or false

and then SelectWrapper might return a WaiveXrayWrapper or a PermissiveXrayDOM.
In this case we do _not_ want to start returning CrossOriginObjectWrapper, and
this is a non-web case anyway, since web compartments can't set wantXrays.

Differential Revision: https://phabricator.services.mozilla.com/D18030

--HG--
extra : moz-landing-system : lando
2019-01-31 15:56:22 +00:00
Jan de Mooij 6ddcffaa4e Bug 1524565 - Clone ScriptSourceObject just once when cloning a script with inner functions. r=tcampbell
Creating too many SSOs can apparently slow down the debugger and it's just
wasteful.

This patch passes the SSO down to the cloning functions. One nice side-effect is
that the self-hosting SSO code now lives in SelfHosting.cpp instead of JSScript.cpp

Differential Revision: https://phabricator.services.mozilla.com/D18347

--HG--
extra : moz-landing-system : lando
2019-02-02 10:42:27 +00:00
Daniel Varga 69d3c6c61d Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : toolkit/components/passwordmgr/test/test_xhr.html => toolkit/components/passwordmgr/test/mochitest/test_xhr.html
2019-02-02 11:44:15 +02:00
Boris Zbarsky 44e2b07ad2 Bug 1521907 part 7. Start using CheckedUnwrapStatic/Dynamic in JS debugger. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D17889

--HG--
extra : moz-landing-system : lando
2019-02-02 03:26:24 +00:00
Boris Zbarsky d9fc29464f Bug 1521907 part 5. Start using CheckedUnwrapStatic/Dynamic in XPConnect. r=peterv
I am not a huge fan of the UnwrapReflectorToISupports setup here.  Maybe we
should introduce two differently-named methods that make it somewhat clear what
the limitations of not taking a JSContext are?  I couldn't think of sane
naming...

Differential Revision: https://phabricator.services.mozilla.com/D17885

--HG--
extra : moz-landing-system : lando
2019-02-02 03:24:45 +00:00
Boris Zbarsky 7e5a37a024 Bug 1521907 part 3. Start using CheckedUnwrapStatic/Dynamic in bindings. r=peterv
The basic idea for the changes around UnwrapObjectInternal and its callers
(UnwrapObject, UNWRAP_OBJECT, etc) is to add a parameter to the guts of the
object-unwrapping code in bindings which can be either a JSContext* or nullptr
(statically typed).  Then we test which type it is and do either a
CheckedUnwrapDynamic or CheckedUnwrapStatic.  Since the type is known at
compile time, there is no actual runtime check; the compiler just emits a call
to the right thing directly (verified by examining the assembly output on
Linux).

The rest of the changes are mostly propagating through that template parameter,
adding static asserts to make sure people don't accidentally pass nullptr while
trying to unwrap to a type that might be a WindowProxy or Location, etc.

There are also some changes to places that were calling CheckedUnwrap directly
to use either the static or dynamic version, as needed.

Differential Revision: https://phabricator.services.mozilla.com/D17883

--HG--
extra : moz-landing-system : lando
2019-02-02 03:23:49 +00:00
Boris Zbarsky e5fac88563 Bug 1521907 part 2. Add dynamic CheckedUnwrap support to CrossOriginObjectWrapper. r=peterv,sfink
This will allow us to correctly handle CheckedUnwrapDynamic on wrappers around
WindowProxy and Location.

Differential Revision: https://phabricator.services.mozilla.com/D17882

--HG--
extra : moz-landing-system : lando
2019-02-02 03:23:16 +00:00
Boris Zbarsky 1fa4aa00d2 Bug 1521907 part 1. Add a version of CheckedUnwrap that can do a dynamic security check. r=jandem,sfink
We're going to need this because we will have multiple Realms in the same
compartment which want different CheckedUnwrap behavior in some cases.  So we
need to be able to check which Realm we're in.

Differential Revision: https://phabricator.services.mozilla.com/D17881

--HG--
extra : moz-landing-system : lando
2019-02-02 03:22:29 +00:00
Bogdan Tara 8c569d6761 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-02-02 01:39:31 +02:00
Bogdan Tara add2612cc6 Backed out 8 changesets (bug 1522837) for buffer-full-inspect-buffer-during-callback.html failures a=backout
Backed out changeset 2bd187c04fd9 (bug 1522837)
Backed out changeset 47c7f936579b (bug 1522837)
Backed out changeset 8fb361192757 (bug 1522837)
Backed out changeset 877d383189f4 (bug 1522837)
Backed out changeset 814aa7e78267 (bug 1522837)
Backed out changeset 2d7be3f59c9d (bug 1522837)
Backed out changeset 893db1319f23 (bug 1522837)
Backed out changeset 3eeb76f0f5d8 (bug 1522837)
2019-02-02 01:34:58 +02:00
Gurzau Raul 34253a9d78 Backed out changeset 56023d83552d (bug 1518377) for bustages at /tests/basic/bug908915.js on a CLOSED TREE 2019-02-01 21:36:39 +02:00
Ted Campbell 8bc1fdd88f Bug 1518377 - Fix the way isIon accesses current script r=nbp
Existing code didn't handle IonIC frames, but the
FrameScriptIter::script function does the right thing for us here.

Differential Revision: https://phabricator.services.mozilla.com/D18151

--HG--
extra : moz-landing-system : lando
2019-02-01 11:19:03 +00:00
Ciure Andrei 3fc7bec4e3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-02-01 19:57:45 +02:00
Ciure Andrei 71db6522be Merge inbound to mozilla-central. a=merge 2019-02-01 19:56:27 +02:00
Benjamin Bouvier d9ab10a50d Bug 1522882: Define SpewBeginWasmFunction in non-debug builds too to fix bustage on a CLOSED TREE; r=me 2019-02-01 16:05:40 +01:00
Robin Templeton 98afdc103b Bug 1524136 - Fix BigInt errors in string conversion and remainder operations r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D18171

--HG--
extra : moz-landing-system : lando
2019-02-01 12:17:06 +00:00
Ciure Andrei 63b0f3f854 Backed out 7 changesets (bug 1521907) for JSObject Wrapper.cpp bustages and failures CLOSED TREE
Backed out changeset ce3108090e77 (bug 1521907)
Backed out changeset efd05f4979f1 (bug 1521907)
Backed out changeset 2d0895148907 (bug 1521907)
Backed out changeset 192152fe986a (bug 1521907)
Backed out changeset ca65b46b0d37 (bug 1521907)
Backed out changeset b3daf5ca3d11 (bug 1521907)
Backed out changeset 1b0a09a46c70 (bug 1521907)
2019-02-01 19:38:25 +02:00
Emanuel Hoogeveen 77a300f11a Bug 1520783 - Don't assert if we fail to map a file after reserving the memory. r=sfink
--HG--
extra : histedit_source : 3665ff06fffa8d2ea6c1f38518c35ea15f72d5ae
2019-01-31 12:17:00 +02:00
Csoregi Natalia 9423fa7897 Merge mozilla-central to mozilla-inbound. CLOSED TREE 2019-02-02 00:14:12 +02:00
Boris Zbarsky f195e65a70 Bug 1521907 part 7. Start using CheckedUnwrapStatic/Dynamic in JS debugger. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D17889

--HG--
extra : moz-landing-system : lando
2019-01-30 17:45:22 +00:00
Boris Zbarsky bed98f8c98 Bug 1521907 part 5. Start using CheckedUnwrapStatic/Dynamic in XPConnect. r=peterv
I am not a huge fan of the UnwrapReflectorToISupports setup here.  Maybe we
should introduce two differently-named methods that make it somewhat clear what
the limitations of not taking a JSContext are?  I couldn't think of sane
naming...

Differential Revision: https://phabricator.services.mozilla.com/D17885

--HG--
extra : moz-landing-system : lando
2019-02-01 16:17:44 +00:00
Boris Zbarsky a3784f4489 Bug 1521907 part 3. Start using CheckedUnwrapStatic/Dynamic in bindings. r=peterv
The basic idea for the changes around UnwrapObjectInternal and its callers
(UnwrapObject, UNWRAP_OBJECT, etc) is to add a parameter to the guts of the
object-unwrapping code in bindings which can be either a JSContext* or nullptr
(statically typed).  Then we test which type it is and do either a
CheckedUnwrapDynamic or CheckedUnwrapStatic.  Since the type is known at
compile time, there is no actual runtime check; the compiler just emits a call
to the right thing directly (verified by examining the assembly output on
Linux).

The rest of the changes are mostly propagating through that template parameter,
adding static asserts to make sure people don't accidentally pass nullptr while
trying to unwrap to a type that might be a WindowProxy or Location, etc.

There are also some changes to places that were calling CheckedUnwrap directly
to use either the static or dynamic version, as needed.

Differential Revision: https://phabricator.services.mozilla.com/D17883

--HG--
extra : moz-landing-system : lando
2019-01-31 15:50:06 +00:00
Boris Zbarsky 9abee38822 Bug 1521907 part 2. Add dynamic CheckedUnwrap support to CrossOriginObjectWrapper. r=peterv
This will allow us to correctly handle CheckedUnwrapDynamic on wrappers around
WindowProxy and Location.

Differential Revision: https://phabricator.services.mozilla.com/D17882

--HG--
extra : moz-landing-system : lando
2019-01-31 11:22:53 +00:00
Boris Zbarsky 9927e55b7e Bug 1521907 part 1. Add a version of CheckedUnwrap that can do a dynamic security check. r=jandem
We're going to need this because we will have multiple Realms in the same
compartment which want different CheckedUnwrap behavior in some cases.  So we
need to be able to check which Realm we're in.

Differential Revision: https://phabricator.services.mozilla.com/D17881

--HG--
extra : moz-landing-system : lando
2019-01-30 17:33:49 +00:00
Benjamin Bouvier 5ca6ea03da Bug 1522882: Drive-by comment fixes; r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D18194

--HG--
extra : rebase_source : 1a9f3468a1d8dd3ddd347d10b38f52468c86f364
2019-01-28 16:10:17 +01:00
Benjamin Bouvier eed37cd072 Bug 1522882: Exit early and print help when IONFLAGS isn't correctly set; r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D18193

--HG--
extra : rebase_source : a16fc95b5a27140d3231bf3db70bf7ec33558f9a
extra : amend_source : 2e7c1831bb577fb29826ef161a16642e1a2747a1
2019-01-25 17:47:42 +01:00
Benjamin Bouvier 2e4330200f Bug 1522882: Add wasm function number to Iongraph spew; r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D18192

--HG--
extra : rebase_source : d596d59a40fb660c35df7018bed605a847942ad9
2019-01-25 17:10:28 +01:00
André Bargull 2ee80e7ac9 Bug 1520286 - Part 2: Add VM-call for TypedArray constructor with Array/TypedArray arguments. r=jandem
--HG--
extra : rebase_source : 899acfc898773aec0a1b3b69aeb1aae07958cdc6
2019-02-01 05:14:41 -08:00
André Bargull 24cd46ac83 Bug 1520286 - Part 1: Switch over inlinable natives via JSJitInfo instead of performing pointer comparisons. r=tcampbell
--HG--
extra : rebase_source : 3293dc0ba2cb953b14d1cca56c8abc4985681b9a
2019-02-01 05:14:40 -08:00
Jan de Mooij 0c7e884af5 Bug 1522837 part 8 - Implement JSOP_GETIMPORT in BaselineInterpreterCodeGen. r=tcampbell
Eventually this op could use an IC or some frontend/bytecode refactoring to make
it faster in the interpreter. For now following the C++ interpreter is the
simplest solution though.

Differential Revision: https://phabricator.services.mozilla.com/D17939

--HG--
extra : moz-landing-system : lando
2019-01-31 18:13:25 +00:00