Commit Graph

2464 Commits

Author SHA1 Message Date
Tom Schuster
4d90baf832 Bug 1529939 - Remove JSVAL_TYPE_MISSING. r=bzbarsky,jandem
Differential Revision: https://phabricator.services.mozilla.com/D20936

--HG--
extra : moz-landing-system : lando
2019-02-26 08:48:01 +00:00
Brian Hackett
d9b3f4ab03 Bug 1447244 Part 3 - Track source ID in JSErrorReport and ErrorObject, r=jimb.
--HG--
extra : rebase_source : 474f8ebd0c15a00a5358edb3b189570d1bb68a69
2019-01-16 11:59:34 -10:00
Brian Hackett
e2c9ceed8d Bug 1447244 Part 2 - Track source ID in saved frames, r=jimb.
--HG--
extra : rebase_source : 6d585a37588dae528e0d37d53d0629f9b509e82d
2019-01-16 11:59:03 -10:00
Chris Martin
d87dc0790f Bug 1527767 - Make all JS allocator functions accept an arena as an argument r=sfink
Currently, some of the JS allocators accept an 'arena' argument, but some
don't. This change makes it so they all do. This is nice for consistency, but
it also feeds into Bug 1052579, which will need to use arenas for JSString
backing buffers.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 18:12:05 +00:00
Tom Schuster
930bcc1969 Bug 1528931 - Introduce JS::ValueType and Value::type. r=jandem
I only converted a few low hanging fruits to the new API. Having to check for PrivateGCThing, which often can't even appear is a bit annoying, but I don't think we really need a different type.

I think next I can look into some of the extractNonDoubleType uses.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 20:36:44 +00:00
Brindusan Cristian
4411b38ba6 Backed out changeset 7fc962a9fa04 (bug 1528931) for build bustages at Value.h. CLOSED TREE 2019-02-21 18:40:13 +02:00
Tom Schuster
da37ed2a7a Bug 1528931 - Introduce JS::ValueType and Value::type. r=jandem
I only converted a few low hanging fruits to the new API. Having to check for PrivateGCThing, which often can't even appear is a bit annoying, but I don't think we really need a different type.

I think next I can look into some of the extractNonDoubleType uses.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 16:09:43 +00:00
Dorel Luca
903004bb6f Backed out changeset 240f53dcb5e6 (bug 1528869) for Spidermonkey failure 2019-02-19 20:36:06 +02:00
Sean Stangl
5d0615ddcc Bug 1528869 - Enable IonMonkey in the ARM64 shell, but keep it disabled in the browser. r=nbp
Enable IonMonkey in the ARM64 shell, but keep it disabled in the browser.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:31:33 +00:00
Csoregi Natalia
952908fda0 Merge mozilla-central to mozilla-inbound. CLOSED TREE 2019-02-17 00:14:07 +02:00
Sylvestre Ledru
e0c61dafa5 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Summary: # ignore-this-changeset

Reviewers: Ehsan

Reviewed By: Ehsan

Subscribers: emilio, jandem, bbouvier, jya

Bug #: 1519636

Differential Revision: https://phabricator.services.mozilla.com/D20062
2019-02-16 20:20:37 +01:00
Markus Stange
d8f5613d1e Bug 1500692 - Add LAYOUT subcategories. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D11341

--HG--
extra : moz-landing-system : lando
2019-02-16 17:38:35 +00:00
Markus Stange
ad3f9a53de Bug 1500692 - Add GRAPHICS subcategories. r=njn,mattwoodrow
r?njn only because this is the first example that adds any actual subcategories.

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

--HG--
extra : moz-landing-system : lando
2019-02-16 17:38:23 +00:00
Markus Stange
99df373110 Bug 1500692 - Add an AUTO_PROFILER_LABEL_CATEGORY_PAIR macro. r=njn
This is similar to AUTO_PROFILER_LABEL, but with only one argument: a category pair.
This reduces duplication for label frames that want just the subcategory name as
their label: Instead of AUTO_PROFILER_LABEL("Layer building", GRAPHICS_LayerBuilding),
you can now just write AUTO_PROFILER_LABEL_CATEGORY_PAIR(GRAPHICS_LayerBuilding) and
the string will automatically be taken from the subcategory.

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

--HG--
extra : moz-landing-system : lando
2019-02-16 17:37:58 +00:00
Markus Stange
0b151b8c2b Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn
The actual subcategories will be added in later patches, so that there are no
unused categories.

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

--HG--
extra : moz-landing-system : lando
2019-02-16 17:37:43 +00:00
Cosmin Sabou
8cb8ef3973 Merge mozilla-central to autoland. 2019-02-15 20:50:34 +02:00
Cosmin Sabou
a4b19fcd61 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : browser/components/nsBrowserContentHandler.js => browser/components/BrowserContentHandler.jsm
2019-02-15 20:39:45 +02:00
Andy Wingo
c3dec3f7b5 Bug 1526309 - Add BigInt support to JSOP_INC and JSOP_DEC r=jandem,terpri
Differential Revision: https://phabricator.services.mozilla.com/D19373

--HG--
extra : moz-landing-system : lando
2019-02-15 09:48:33 +00:00
Sylvestre Ledru
41d1d79094 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-15 08:15:57 +00:00
Yoshi Cheng-Hao Huang
4adf318170 Bug 1527881 - fix compilation error in Rooted<GCVector<T>>::emplaceBack. r=sfink 2019-02-15 10:38:34 +01:00
Benjamin Bouvier
15a9d62bdb Bug 1524337: Rename ENABLE_BINARYDATA to ENABLE_TYPED_OBJECTS and use moz.configure; r=luke
Differential Revision: https://phabricator.services.mozilla.com/D19786

--HG--
extra : rebase_source : af564cff5be797b6c993fc80d9527b5196680ff8
extra : histedit_source : 8f8f4afa70341fd0628f46f41b5a01260d01c9b3
2019-02-14 12:44:25 +01:00
Andy Wingo
7d559ef8c3 Bug 1527860 - Remove ENABLE_BIGINT #ifdef r=jandem,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D19766

--HG--
extra : moz-landing-system : lando
2019-02-14 15:03:44 +00:00
shindli
54aa04bfd1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-02-13 23:36:24 +02:00
Jim Blandy
6cc5bf24a5 Bug 1145201: Implement JS::AutoDebuggerJobQueueInterruption. r=arai,smaug
Define a new RAII class, AutoDebuggerJobQueueInterruption, to save and restore
the current ECMAScript job queue, to protect the debuggee's job queue from
activity that occurs in debugger callbacks. Add a new method to the JS::JobQueue
abstract base class, saveJobQueue, to support AutoDebuggerJobQueueInterruption.
Comments on AutoDebuggerJobQueueInterruption provide details.

Implement saveJobQueue for SpiderMonkey's internal job queue and for Gecko's job
queue in CycleCollectedJSContext.

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

--HG--
extra : moz-landing-system : lando
2019-02-12 08:14:34 +00:00
Jim Blandy
0ae9145c60 Bug 1145201: Replace EnqueuePromiseJobCallback and GetIncumbentGlobalCallback with new JobQueue abstract base class. r=arai,smaug
While the behavior of ECMAScript Promises and their associated job queue is
covered by the ECMAScript standard, the HTML specification amends that with
additional behavior the web platform requires. To support this, SpiderMonkey
provides hooks the embedding can set to replace SpiderMonkey's queue with its
own implementation.

At present, these hooks are C-style function-pointer-and-void-pointer pairs,
which are awkward to handle and mistake-prone, as passing a function the wrong
void* is not a type error. Later patches in this series must add new hooks,
making a bad situation worse.

A C++ abstract base class is a well-typed alternative. This introduces a new
`JS::JobQueue` abstract class, and adapts SpiderMonkey's internal job queue and
Gecko's customization to use it. `GetIncumbentGlobalCallback` and
`EnqueuePromiseJobCallback` become virtual methods.

Within SpiderMonkey, the patch gathers the various fields of JSContext that
implement the internal queue into their own type, js::InternalJobQueue. Various
jsfriendapi functions become veneers for calls to methods specific to the
derived class. The InternalJobQueue type itself remains private to SpiderMonkey,
as it uses types like TraceableFifo, derived from Fifo, that are not part of
SpiderMonkey's public API.

Within Gecko, CycleCollectedJSContext acquires JS::JobQueue as a private base
class, and a few static methods are cleaned up nicely.

There are a few other hooks defined in js/public/Promise.h that might make sense
to turn into virtual methods on JobQueue. For example,
DispatchToEventLoopCallback, used for resolving promises of results from
off-main-thread tasks, is probably necessarily connected to the JobQueue
implementation in use, so it might not be sensible to set one without the other.
But it was left unchanged to reduce this patch's size.

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

--HG--
extra : moz-landing-system : lando
2019-02-12 08:16:16 +00:00
Jan de Mooij
6b8698ce2d Bug 1526588 - Fix some issues with js::GetFirstGlobalInCompartment and XPCWrappedNativeScope::UpdateWeakPointersInAllScopesAfterGC. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D19493

--HG--
extra : moz-landing-system : lando
2019-02-13 06:41:44 +00:00
Sean Stangl
c82dda2439 Bug 1523015 - Summary: Enable Ion on ARM64, but disable in-browser by pref. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D19448

--HG--
extra : moz-landing-system : lando
2019-02-12 22:50:27 +00:00
Jon Coppeard
510569c075 Bug 1526375 - Replace DispatchTaceKindTyped for cell pointers with another version of MapGCThingTyped and use this where possible r=sfink 2019-02-09 08:29:51 +00:00
Jon Coppeard
1aa258e905 Bug 1526375 - Replace DispatchTyped with MapGCThingTyped and use generic lambdas rather than separate functor classes r=sfink 2019-02-09 08:26:27 +00:00
Cosmin Sabou
9c31ff864d Merge mozilla-central to mozilla-inbound. 2019-02-08 18:19:43 +02:00
Jon Coppeard
6e15e4b1f3 Bug 1525663 - Use return type deduction to remove complex decltype expressions r=sfink 2019-02-08 10:34:02 +00:00
Jan de Mooij
13c7bd6d2c Bug 1525674 part 1 - Change the enumerate proxy trap to return the jsid vector instead of an iterator. r=bzbarsky,evilpie
In vm/Iteration.cpp this inlines some functions because there's a single
caller now. Follow-up patches will do additional cleanup/optimization.

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

--HG--
extra : moz-landing-system : lando
2019-02-08 08:17:00 +00:00
Steve Fink
6611614bd6 Bug 1500247 - Make GCHash{Map,Set} inherit annotations from template params, r=jonco
--HG--
extra : rebase_source : e4e04240c71665965b7fabe563e2327cc6c4ddc3
2018-12-14 09:48:09 -08:00
Steve Fink
1150832058 Bug 1500247 - Add a mechanism to embed known hazards into test files and verify that they are caught, r=jonco
Use it to verify that MOZ_INHERIT_ATTRIBUTE_FROM_TEMPLATE_PARAM works.

--HG--
extra : rebase_source : cb0d6d901d723274053988cdf70fedd92504e40e
2018-12-28 21:13:32 -08: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
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
Gurzau Raul
44e4d42e8a Backed out 7 changesets (bug 1521907) for failing at unit/test_bug1151385.js on a CLOSED TREE.
Backed out changeset ef04359ccf0d (bug 1521907)
Backed out changeset ac1c61bf61e9 (bug 1521907)
Backed out changeset df09b7be63c5 (bug 1521907)
Backed out changeset 585fa0024d46 (bug 1521907)
Backed out changeset e593c29aaff4 (bug 1521907)
Backed out changeset ac2e180a35b6 (bug 1521907)
Backed out changeset 270b1db9ea81 (bug 1521907)
2019-02-02 00:58:16 +02:00
Boris Zbarsky
511978c370 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-01 22:00:10 +00:00
André Bargull
6b7d6152d7 Bug 1522465 - Part 3: Remove remaining users of JSCLASS_IS_ANONYMOUS. r=jorendorff 2019-01-24 05:46:03 -08:00
Tom Schuster
35523d50cc Bug 1156077 - Remove the non-standard Proxy getPropertyDescriptor trap. r=bzbarsky,jorendorff
I am bit surprised myself, but just removing the getPropertyDescriptor trap seems to mostly work.
The only real special case here is the XPC Sandbox, which I changed to keep using its getPropertyDescriptorImpl.

testSetPropertyIgnoringNamedGetter.cpp didn't even really need its getPropertyDescriptor implementation.

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

--HG--
extra : moz-landing-system : lando
2019-01-25 16:41:34 +00:00
Jeff Walden
59aaefa333 Bug 1522350 - Move JS::ContextOptions{,Ref} to a new js/public/ContextOptions.h header to further slim jsapi.h. r=arai
--HG--
rename : js/src/jsapi.h => js/public/ContextOptions.h
2019-01-23 16:56:56 -08:00
Jeff Walden
c52204b560 Bug 1520878 - Process '-e foo' arguments to the JS shell as UTF-8, not Latin-1, in order to remove JS::EvaluateLatin1, the last public Latin-1-consuming compilation API in SpiderMonkey. r=jandem 2019-01-14 23:01:14 -05:00
Oana Pop Rus
82553cc5f6 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-24 19:10:46 +02:00
Jon Coppeard
de2d55ee8b Bug 1521524 - Replace some uses of the 'API' GC reason with more informative ones r=sfink 2019-01-24 12:34:55 +00:00
Jon Coppeard
38c7ae49bd Bug 1521524 - Remove some unused GC reasons r=sfink 2019-01-24 12:34:55 +00:00
Andy Wingo
eff6f7d841 Bug 1507520 - Make BigInt parsing dependent on run-time feature flag r=jandem,terpri
Differential Revision: https://phabricator.services.mozilla.com/D17349

--HG--
extra : moz-landing-system : lando
2019-01-24 09:06:41 +00:00
Dorel Luca
5bbf8df2a2 Backed out changeset 647e4cfc0eb4 (bug 1507520) for Spidermonkey failures 2019-01-23 19:40:54 +02:00
Andy Wingo
514415e0a0 Bug 1507520 - Make BigInt parsing dependent on run-time feature flag r=jandem,terpri
Differential Revision: https://phabricator.services.mozilla.com/D17349

--HG--
extra : moz-landing-system : lando
2019-01-23 16:55:32 +00:00
Andy Wingo
887bf9200b Bug 1502797 - Reimplement BigInt using V8/JSC code instead of GMP r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D10046

--HG--
extra : moz-landing-system : lando
2019-01-23 11:13:51 +00:00
Razvan Maries
299b5e79f7 Merge mozilla-inbound to mozilla-central a=merge 2019-01-21 19:50:56 +02:00