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

5080 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 81f57ed877 Bug 1562008. Update the grammar for IDL union types to exclude Promise types. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D36238

--HG--
extra : moz-landing-system : lando
2019-07-02 22:17:40 +00:00
Boris Zbarsky ef2db21d4d Bug 1562004. Disallow specifying [Global] and [Constructor] or [NamedConstructor] on the same interface. r=peterv
See https://github.com/heycam/webidl/issues/744

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

--HG--
extra : moz-landing-system : lando
2019-07-02 07:56:26 +00:00
Kagami Sascha Rosylight 3f472122f6 Bug 1560462: Implement DOMMatrix.fromMatrix r=bzbarsky
Also fixes `.multiply()` to use DOMMatrixInit.

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

--HG--
extra : moz-landing-system : lando
2019-06-30 03:02:13 +00:00
Coroiu Cristina 3712f3103e Backed out changeset d63622bdde81 (bug 1560462) for wpt failures at css/geometry/DOMMatrixInit-validate-fixup.html 2019-06-30 03:21:14 +03:00
Kagami Sascha Rosylight ef13c99bda Bug 1560462: Implement DOMMatrix.fromMatrix r=bzbarsky
Also fixes `.multiply()` to use DOMMatrixInit.

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

--HG--
extra : moz-landing-system : lando
2019-06-29 03:24:08 +00:00
Boris Zbarsky 75224691ef Bug 1350254 part 2. Switch ImageData to [Serializable]. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D35716

--HG--
extra : moz-landing-system : lando
2019-06-25 06:44:38 +00:00
Boris Zbarsky 68a52b3c30 Bug 1350254 part 1. Add support for [Serializable] in the Web IDL parser and code generator. r=baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D35715

--HG--
extra : moz-landing-system : lando
2019-06-27 22:21:22 +00:00
Boris Zbarsky fdecfb9423 Bug 1560553 part 2. Improve the assertions in MaybeWrapNonDOMObjectValue. r=peterv
We don't need to worry about JSCLASS_PRIVATE_IS_NSISUPPORTS, because the only
work we're really skipping here compared to MaybeWrapObjectValue is the
TryToOuterize call, and that only matters for Window objects, which always have
a DOM class.

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

--HG--
extra : moz-landing-system : lando
2019-06-27 16:13:32 +00:00
Boris Zbarsky 486374ebb4 Bug 1560553 part 1. Simplify the TryToOuterize callers a bit. r=peterv
TryToOuterize fast-path bails out if a bit-check on the JSClass fails.  Trying
to avoid that bit-check by checking for a DOM class, which is also a bit-check
on the JSClass doesn't really make sense.

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

--HG--
extra : moz-landing-system : lando
2019-06-27 15:03:20 +00:00
Zibi Braniecki 224a1bb5c4 Bug 1560342 - Replace generic `object` argument with a specific L10nArgs object for passing l10n arguments. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D35586

--HG--
extra : moz-landing-system : lando
2019-06-25 19:43:50 +00:00
Zibi Braniecki ae32fa44eb Bug 1560342 - Factor Localization out of DOMLocalization. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D35445

--HG--
extra : moz-landing-system : lando
2019-06-25 19:39:53 +00:00
Jeff Gilbert 7c6109af7b Bug 1560422 - WEBGL_explicit_present extension. r=lsalzman,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D35495

--HG--
extra : moz-landing-system : lando
2019-06-25 19:48:24 +00:00
Boris Zbarsky 00ac432030 Improve documentation around 'concrete' in bindings. No bug. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D35465

--HG--
extra : moz-landing-system : lando
2019-06-21 06:50:52 +00:00
Boris Zbarsky 50150d0231 Bug 1559468 part 2. Move JS_DefineProfilingFunctions into dom::CreateGlobal. r=mccr8
Various callers either already call it or should but are forgetting to.  The exception is WorkerDebuggerGlobalScope_Binding::Wrap, but it should be OK to set up the profiling functions there too.

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

--HG--
extra : moz-landing-system : lando
2019-06-20 23:07:40 +00:00
longsonr 160c161d5f Bug 1551030 - Merge all SVGRect classes r=dholbert 2019-06-20 07:03:54 -07:00
Tooru Fujisawa 5e4375de8d Bug 1557056 - Use extended function only for self-hosted function that needs to store canonical name in extended slot. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D34983

--HG--
extra : moz-landing-system : lando
2019-06-19 20:00:24 +00:00
Logan Smyth a1de03c27b Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30565

--HG--
extra : moz-landing-system : lando
2019-06-17 04:36:29 +00:00
Dorel Luca e12ad70ab7 Backed out 2 changesets (bug 1529345) for Windows 2012 build bustages
Backed out changeset 87aa4894b4a1 (bug 1529345)
Backed out changeset cf6f6281cb44 (bug 1529345)

--HG--
extra : rebase_source : b19274a3d20d3a1ea92f0fe1224ef30910e10916
2019-06-14 23:34:36 +03:00
Logan Smyth 77f27aa54c Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30565

--HG--
extra : moz-landing-system : lando
2019-06-14 18:25:47 +00:00
Dorel Luca 6b40527932 Backed out 2 changesets (bug 1529345) for Build Bustage. CLOSED TREE
Backed out changeset 63f80a49839e (bug 1529345)
Backed out changeset 15bac42cc73a (bug 1529345)
2019-06-14 20:55:52 +03:00
Logan Smyth c09e533d0e Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30565

--HG--
extra : moz-landing-system : lando
2019-06-14 17:14:13 +00:00
Eden Chuang 2e0a3f0ddb Bug 1546306 - Add an optional aFromChromeContext parameter to nsIScriptError::InitWithWindowID for the case the passed in windowId is zero. r=baku
In some cases, the nsIScriptError is initialized with zero innerWindowId, but is from chrome context.

For cases, this patch adds an optional aFromChromeContext parameter to nsIScriptError::InitWithWindowID, which default value is false.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 09:50:49 +00:00
Peter Van der Beken 2f11f4dd4c Bug 1490044 - Convert WebIDL pref disablers to use StaticPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33508

--HG--
extra : moz-landing-system : lando
2019-06-13 09:01:18 +00:00
Peter Van der Beken 8b00dd9ff2 Bug 1490044 - Move all prefs used in WebIDL to StaticPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33507

--HG--
extra : moz-landing-system : lando
2019-06-13 09:00:59 +00:00
Andrew McCreight 391865dfe8 Bug 1557141 - IsRemoteObjectProxy shouldn't be static top level functions. r=bzbarsky
This will create copies of the function in each translation unit.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 20:27:40 +00:00
Zibi Braniecki 307d0160a7 Bug 1552714 - Remove dom::l10n namespace and unify class naming. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33739

--HG--
rename : dom/chrome-webidl/DOMOverlays.webidl => dom/chrome-webidl/L10nOverlays.webidl
rename : dom/l10n/Mutations.cpp => dom/l10n/L10nMutations.cpp
rename : dom/l10n/Mutations.h => dom/l10n/L10nMutations.h
rename : dom/l10n/DOMOverlays.cpp => dom/l10n/L10nOverlays.cpp
rename : dom/l10n/DOMOverlays.h => dom/l10n/L10nOverlays.h
rename : dom/l10n/tests/gtest/TestDOMOverlays.cpp => dom/l10n/tests/gtest/TestL10nOverlays.cpp
rename : dom/l10n/tests/mochitest/dom_localization/test_mutations.html => dom/l10n/tests/mochitest/dom_localization/test_l10n_mutations.html
rename : dom/l10n/tests/mochitest/mutations/test_append_content_post_dcl.html => dom/l10n/tests/mochitest/l10n_mutations/test_append_content_post_dcl.html
rename : dom/l10n/tests/mochitest/mutations/test_append_content_pre_dcl.html => dom/l10n/tests/mochitest/l10n_mutations/test_append_content_pre_dcl.html
rename : dom/l10n/tests/mochitest/mutations/test_append_fragment_post_dcl.html => dom/l10n/tests/mochitest/l10n_mutations/test_append_fragment_post_dcl.html
rename : dom/l10n/tests/mochitest/mutations/test_pause_observing.html => dom/l10n/tests/mochitest/l10n_mutations/test_pause_observing.html
rename : dom/l10n/tests/mochitest/mutations/test_set_attributes.html => dom/l10n/tests/mochitest/l10n_mutations/test_set_attributes.html
rename : dom/l10n/tests/mochitest/domoverlays/test_attributes.html => dom/l10n/tests/mochitest/l10n_overlays/test_attributes.html
rename : dom/l10n/tests/mochitest/domoverlays/test_extra_text_markup.html => dom/l10n/tests/mochitest/l10n_overlays/test_extra_text_markup.html
rename : dom/l10n/tests/mochitest/domoverlays/test_functional_children.html => dom/l10n/tests/mochitest/l10n_overlays/test_functional_children.html
rename : dom/l10n/tests/mochitest/domoverlays/test_domoverlays.xul => dom/l10n/tests/mochitest/l10n_overlays/test_l10n_overlays.xul
rename : dom/l10n/tests/mochitest/domoverlays/test_same_id.html => dom/l10n/tests/mochitest/l10n_overlays/test_same_id.html
rename : dom/l10n/tests/mochitest/domoverlays/test_same_id_args.html => dom/l10n/tests/mochitest/l10n_overlays/test_same_id_args.html
rename : dom/l10n/tests/mochitest/domoverlays/test_text_children.html => dom/l10n/tests/mochitest/l10n_overlays/test_text_children.html
extra : moz-landing-system : lando
2019-06-06 16:32:58 +00:00
Zibi Braniecki fdd3cb9cbd Bug 1552714 - Move DocumentL10n to dom/l10n. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32957

--HG--
rename : dom/webidl/DocumentL10n.webidl => dom/chrome-webidl/DocumentL10n.webidl
rename : intl/l10n/DocumentL10n.cpp => dom/l10n/DocumentL10n.cpp
rename : intl/l10n/DocumentL10n.h => dom/l10n/DocumentL10n.h
extra : moz-landing-system : lando
2019-06-06 16:31:44 +00:00
Zibi Braniecki 319ed7e3c9 Bug 1552714 - Extract DOMLocalization out of DocumentL10n. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32397

--HG--
extra : moz-landing-system : lando
2019-06-06 16:31:25 +00:00
Thomas Nguyen 01ff0bf93f Bug 1534681 Use ReferrerInfo class in document r=ckerschb,baku,Gijs
Also, in many place, we use document uri as referrer. It is not right
for the case srdoc iframe. We should use the last non-srdoc parent
document's uri

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

--HG--
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html
extra : moz-landing-system : lando
2019-06-06 07:23:37 +00:00
Boris Zbarsky 34522cf0c8 Bug 1555085. Don't assume that objects whose DOMObjectType is eInterface have a DOMIfaceAndProtoJSClass JSClass. r=peterv
Named constructors are eInterface but are plain Function objects, without a
DOMIfaceAndProtoJSClass class.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 09:49:24 +00:00
Chris Manchester 399d530b9b Bug 1556185 - Ensure autoconf.mk is tracked as a dependency when preprocessing webidls. r=nalexander
webidlsrcs.mk is treated specially by the build system, and this entire
process should be supported better by moz.build, but in the meantime this
fixes the clobber bug caused by not re-building these targets when defines
are updated.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 20:33:36 +00:00
Jon Coppeard 5d93091ef5 Bug 1555729 - Improve CallbackObject::CallbackPreserveColor comments to warn about use of Reset() r=bzbarsky?
Differential Revision: https://phabricator.services.mozilla.com/D33263

--HG--
extra : moz-landing-system : lando
2019-05-31 16:19:41 +00:00
Andrea Marchesini b1b122fb20 Bug 1554464 - Merge nsICookie2 and nsICookie in 1 single interface, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D33031

--HG--
extra : moz-landing-system : lando
2019-05-31 09:36:44 +00:00
Boris Zbarsky 7f4c22772f Bug 1553018 part 6. Allow [Pref] annotations on dictionary members. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D32947

--HG--
extra : moz-landing-system : lando
2019-05-30 17:23:06 +00:00
Boris Zbarsky a4f8e9b452 Bug 1553018 part 5. Remove now-unused conditionSetup bits in getConditionList. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D32946

--HG--
extra : moz-landing-system : lando
2019-05-30 17:22:45 +00:00
Boris Zbarsky 561e744e8c Bug 1553018 part 4. Start using StaticPrefs for Pref visibility annotations on interface objects. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D32945

--HG--
extra : moz-landing-system : lando
2019-05-30 17:22:32 +00:00
Boris Zbarsky e379022658 Bug 1551282 and bug 1553436. Allow pages to override window.u2f but not the "sign" and "register" properties on the U2F object. r=jcj,smaug
There are two related problems this patch is trying to address.  The first, and
simpler, one is bug 1553436: there are websites that use existing variables and
functions named "u2f" and adding a non-replaceable readonly property with that
name on Window breaks them.  The fix for this is straightforward: mark the
property [Replaceable].

The second problem, covered by bug 1551282, involves sites that use the Google
U2F polyfill.  The relevant parts of that polyfill look like this:

  'use strict';
  var u2f = u2f || {};
  u2f.register = some_function_that_only_works_right_in_Chrome;
  u2f.sign = some_function_that_only_works_right_in_Chrome;

The failure mode for that code before this fix is that the assignment to "u2f"
throws because it's a readonly property and we're in strict mode, so any code
the page concatenates in the same file after the polyfill does not get run.
That's what bug 1551282 is about.  The [Replaceable] annotation fixes that
issue, because now the polyfill gets the value of window.u2f and then redefines
the property (via the [Replaceable] setter) to be a value property with that
value.  So far, so good.

But then we need to prevent the sets of u2f.register
and u2f.sign from taking effect, because if they are allowed to happen, the
actual sign/register functionality on the page will not work in Firefox.  We
can't just make the properties readonly, because then the sets will throw due
to being in strict mode, and we still have bug 1551282.  The proposed fix is to
make these accessor properties with a no-op setter, which is exactly what
[LenientSetter] gives us.

The rest of the patch is just setting up infrastructure for generating the
normal bits we would generate if "sign" and "register" were methods and using
that to create the JSFunctions at the point when the getter is called.  The
JSFunctions then get cached on the u2f instance object.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 20:40:59 +00:00
shindli 54646b5a7c Backed out changeset 823ab2e5430a (bug 1551282) for Windows build bustages CLOSED TREE 2019-05-24 21:15:20 +03:00
Boris Zbarsky 943dde7841 Bug 1554195. Remove MSG_THIS_DOES_NOT_IMPLEMENT_INTERFACE. r=mccr8
I was clearly trying to do that in bug 882653 part 3 and failed to.  Our
current behavior of passing two args to this error message (which only takes
one arg) is silly, and the only thing that makes it at all sane is that we only
use it in class hooks, which can never have the wrong sort of object, so it's
unreached code.

The comment cleanup is just to make the role of CGAbstractBindingMethod. and
the validity of the changes to it, clearer.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 17:31:42 +00:00
Boris Zbarsky cd062bb5d7 Bug 1551282 and bug 1553436. Allow pages to override window.u2f but not the "sign" and "register" properties on the U2F object. r=jcj,smaug
There are two related problems this patch is trying to address.  The first, and
simpler, one is bug 1553436: there are websites that use existing variables and
functions named "u2f" and adding a non-replaceable readonly property with that
name on Window breaks them.  The fix for this is straightforward: mark the
property [Replaceable].

The second problem, covered by bug 1551282, involves sites that use the Google
U2F polyfill.  The relevant parts of that polyfill look like this:

  'use strict';
  var u2f = u2f || {};
  u2f.register = some_function_that_only_works_right_in_Chrome;
  u2f.sign = some_function_that_only_works_right_in_Chrome;

The failure mode for that code before this fix is that the assignment to "u2f"
throws because it's a readonly property and we're in strict mode, so any code
the page concatenates in the same file after the polyfill does not get run.
That's what bug 1551282 is about.  The [Replaceable] annotation fixes that
issue, because now the polyfill gets the value of window.u2f and then redefines
the property (via the [Replaceable] setter) to be a value property with that
value.  So far, so good.

But then we need to prevent the sets of u2f.register
and u2f.sign from taking effect, because if they are allowed to happen, the
actual sign/register functionality on the page will not work in Firefox.  We
can't just make the properties readonly, because then the sets will throw due
to being in strict mode, and we still have bug 1551282.  The proposed fix is to
make these accessor properties with a no-op setter, which is exactly what
[LenientSetter] gives us.

The rest of the patch is just setting up infrastructure for generating the
normal bits we would generate if "sign" and "register" were methods and using
that to create the JSFunctions at the point when the getter is called.  The
JSFunctions then get cached on the u2f instance object.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 17:19:23 +00:00
Boris Zbarsky 3d0e0bba72 Bug 1121623 part 10. Use a more-accurate default value for 'concrete' in Web IDL bindings. r=peterv
The idea is that we should only generate concreate-binding (wrap methods, etc)
machinery for an interface by default if we have reason to expect that the
interface is used as the primary interface for some objects.  Two clear signals
that would indicate that are the interface being a leaf interface (with no
descendants) and the interface having a constructor.  Other cases would require
a 'concrete' annotation in Bindings.conf.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 10:43:37 +00:00
Boris Zbarsky 6f302d793c Bug 1121623 part 9. Change example codegen to not spit out WrapObject bits for non-concrete interfaces. r=peterv
This should keep people from marking things concrete unnecessarily just so
their example-generated WrapObject works.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 07:34:33 +00:00
Boris Zbarsky 471d7a508d Bug 1121623 part 3. Switch WebrtcGlobalInformation to being a namespace. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D32201

--HG--
extra : moz-landing-system : lando
2019-05-24 07:22:22 +00:00
Boris Zbarsky d51859cb38 Bug 1121623 part 2. Switch AddonManagerPermissions to being a namespace. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D32200

--HG--
extra : moz-landing-system : lando
2019-05-24 07:19:58 +00:00
Boris Zbarsky 28c8e552a8 Bug 1121623 part 1. Switch PromiseDebugging to being a namespace, since that's how we use it. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D32199

--HG--
extra : moz-landing-system : lando
2019-05-24 07:13:16 +00:00
Jeff Gilbert 047e98938e Bug 1536672 - Implement WebGL OVR_multiview2 behind draft flag. r=lsalzman,qdot
Also disable clang-format for gfx/gl/GLConsts.h.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 20:48:21 +00:00
Zibi Braniecki 2ee19983ae Bug 1546432 - Migrate DocumentL10n to use dom::l10n::Mutations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D28981

--HG--
extra : moz-landing-system : lando
2019-05-21 19:46:32 +00:00
Mihai Alexandru Michis 354eec452c Backed out changeset a649f69f29df (bug 1536672) for failing crashtest at WebGLContextValidate.cpp. CLOSED TREE 2019-05-23 10:57:29 +03:00
Jeff Gilbert fb7050f9bf Bug 1536672 - Implement WebGL OVR_multiview2 behind draft flag. r=lsalzman,qdot
Also disable clang-format for gfx/gl/GLConsts.h.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 02:43:11 +00:00
Boris Zbarsky 3022e3c3fb Bug 1553286. Mark legacycall hooks (and a few other binding hooks) as MOZ_CAN_RUN_SCRIPT. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D32053

--HG--
extra : moz-landing-system : lando
2019-05-22 02:50:55 +00:00
Tooru Fujisawa 66e25f6243 Bug 1549340 - Part 2: Use union instead of reinterpret_cast to initialize const char* with symbol for JSPropertySpec.name. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D30493

--HG--
extra : moz-landing-system : lando
2019-05-13 10:26:48 +00:00
Csoregi Natalia e3fa16f6f6 Backed out changeset 1760c6913c09 (bug 1549340) for rust bustage. CLOSED TREE
--HG--
extra : rebase_source : 19015aa11df57b8026881f6a86a4714887ec0244
2019-05-10 18:16:09 +03:00
Tooru Fujisawa 9fa8a62e9e Bug 1549340 - Part 2: Use union instead of reinterpret_cast to initialize const char* with symbol for JSPropertySpec.name. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D30493

--HG--
extra : moz-landing-system : lando
2019-05-10 14:08:07 +00:00
Boris Chiou 7ab6e6d017 Bug 1545239 - Update ResizeObserver and ResizeObserverEntry. r=smaug,dholbert
In this patch, we support
1. content-box (default)
2. border-box

And let ResizeObserverEntry expose these box sizes.

Besides, we store the mLastReportedSize as the logical size.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 20:54:36 +00:00
Brian Hackett ab337aa92c Bug 1392408 Part 3 - Report stacks to net monitor when loading worker scripts, r=bzbarsky.
--HG--
extra : rebase_source : c4b52354dc9c71bb86cd157f0f710d01b78659e5
2019-05-02 08:34:27 -10:00
Zibi Braniecki 28c31b907a Bug 1548798 - Switch SequenceRooter, RecordRooter and RootedUnion to use RootedContext. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D29810

--HG--
extra : moz-landing-system : lando
2019-05-03 16:07:21 +00:00
Boris Zbarsky 517a6ebdd7 Bug 1547923 part 6. Make nsIGlobalObject::GetGlobalJSObject always expose to active JS. r=mccr8
See callsite audit in https://bugzilla.mozilla.org/attachment.cgi?id=9061976
for details on why the remaining GetGlobalJSObject callers should switch to the
"always expose" behavior.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 21:36:15 +00:00
Boris Zbarsky 356eb6dfd9 Bug 1547923 part 5. Start using nsIGlobalObject::GetGlobalJSObjectPreserveColor where possible. r=mccr8,jonco
Differential Revision: https://phabricator.services.mozilla.com/D29706

--HG--
extra : moz-landing-system : lando
2019-05-03 15:15:31 +00:00
Boris Zbarsky ff72e84ac1 Bug 1547923 part 4. Add nsIGlobalObject::HasJSGlobal(). r=mccr8
Consumers that just care about this boolean state should use this instead of
getting the JSObject* directly.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 21:32:17 +00:00
Boris Zbarsky 5c1d789bfa Bug 1547923 part 3. Add nsIGlobalObject::GetGlobalJSObjectPreserveColor(). r=mccr8
This can be used in things like assertions or some other rare circumstances
where not exposing the object to active JS is OK.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 21:23:35 +00:00
Coroiu Cristina 3b1ccb8045 Merge mozilla-central to inbound a=merge 2019-05-01 07:27:22 +03:00
Steve Fink 8484af2fa6 Bug 1547782 - Implement GCPolicy<T>::isValid for Gecko specializations r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D29302

--HG--
extra : moz-landing-system : lando
2019-04-30 21:48:32 +00:00
Fariskhi Vidyan b2514b847b Bug 1272409 - Part 2: Add ResizeObserver webidl and implementation. r=dholbert,smaug
This implements the first version of spec, so the webidl file doesn't
match the current spec and we will fix them in the follow-up bugs.

i.e.
1. The default observer box is content-box.
2. `ResizeObserverBoxOptions`, `ResizeObserverOptions`, and `ResizeObserverSize`
   are not included in `ResizeObserver.webidl`.
3. `ResizeObserverEntry` doesn't have `borderBoxSize` and `contentBoxSize`
   attributes.

Depends on D27615

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

--HG--
extra : moz-landing-system : lando
2019-04-26 20:29:14 +00:00
Boris Zbarsky 99bd4f897d Bug 1317658 part 2. Pass enough information to bindings' GetDesiredProto to allow it to return the prototype the spec says it should. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D28518

--HG--
extra : moz-landing-system : lando
2019-04-26 15:55:59 +00:00
Boris Zbarsky 5b875fd884 Bug 1317658 part 1. Remove unnecessary isConstructing check from GetDesiredProto, now that all callers ensure that we are in fact constructing. r=edgar
Binding constructors started doing that in bug 979591.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 11:28:46 +00:00
Tooru Fujisawa 56585dc81e Bug 1543843 - Add constructors to JSPropertySpec and inner structs/unions. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D27277

--HG--
extra : moz-landing-system : lando
2019-04-26 01:01:15 +00:00
Daniel Varga 46db25d004 Backed out 5 changesets (bug 1272409) for build bustage at /builds/worker/workspace/build/src/dom/base/nsGlobalWindowCommands. On a CLOSED TREE
Backed out changeset 2ad8260489d6 (bug 1272409)
Backed out changeset 224dad4cbdc3 (bug 1272409)
Backed out changeset 72775dbf35c8 (bug 1272409)
Backed out changeset c331a4a8b343 (bug 1272409)
Backed out changeset d817fbfc52b6 (bug 1272409)
2019-04-26 02:41:43 +03:00
Fariskhi Vidyan 3d0af6e0c6 Bug 1272409 - Part 2: Add ResizeObserver webidl and implementation. r=dholbert,smaug
This implements the first version of spec, so the webidl file doesn't
match the current spec and we will fix them in the follow-up bugs.

i.e.
1. The default observer box is content-box.
2. `ResizeObserverBoxOptions`, `ResizeObserverOptions`, and `ResizeObserverSize`
   are not included in `ResizeObserver.webidl`.
3. `ResizeObserverEntry` doesn't have `borderBoxSize` and `contentBoxSize`
   attributes.

Depends on D27615

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

--HG--
extra : moz-landing-system : lando
2019-04-25 18:30:06 +00:00
Zibi Braniecki 0e59a5d8f4 Bug 1544118 - Move nsINode::localize to use DocumentL10n::TranslateFragment. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D28269

--HG--
extra : moz-landing-system : lando
2019-04-24 10:35:37 +00:00
Noemi Erli 7bb9457084 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-04-24 12:57:59 +03:00
Zibi Braniecki 0890bbe4c2 Bug 1503657 - Implement Fluent DOMOverlays in C++. r=smaug,Pike
Differential Revision: https://phabricator.services.mozilla.com/D27200

--HG--
extra : moz-landing-system : lando
2019-04-24 05:05:11 +00:00
Emilio Cobos Álvarez 1b45496357 Bug 1546467 - Preserve reflectors of custom elements when they already have one. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D28542

--HG--
extra : moz-landing-system : lando
2019-04-23 21:01:39 +00:00
Ciure Andrei d753cf6b80 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-04-24 07:30:32 +03:00
Ryan Hunt 3675f2449b Bug 1534395 - Rename nsITabParent to nsIRemoteTab. r=nika,mconley
nsITabParent is exposed to frontend code and is generally used as a representation of a remote tab. We could just rename the interface to nsIBrowserParent and worry about it later, but I think it's better to rename the interface to nsIRemoteTab so that we can later work on splitting the interface away from the PBrowser protocol.

Note: Some frontend code refers to a TabParentId. This commit renames this to RemoteTabId. We need to figure out the purpose of TabId with fission.

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

--HG--
rename : dom/interfaces/base/nsITabParent.idl => dom/interfaces/base/nsIRemoteTab.idl
extra : rebase_source : 9d8a1790a7bb10195ad063644d1a93d63b2afb72
2019-04-09 15:59:37 -05:00
Olli Pettay 779ae5beb3 Bug 1544670, don't let one to reuse unlinked CallbackObjectHolder, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27732

--HG--
extra : moz-landing-system : lando
2019-04-17 11:41:31 +00:00
Rob Wu 4a6f84f91d Bug 1544834 - Replace deprecated generics in test code r=evilpie
- `Array.map` becomes `Array.from`
- Array copying via `Array.slice` becomes `Array.from`.
- `Array.forEach` that did not rely on closures becomes `for`-`of` loops.
- Anything else: `Array.X` becomes `Array.prototype.X`.

Complex cases:

dom/bindings/test/TestInterfaceJS.js and
dom/bindings/test/test_exception_options_from_jsimplemented.html
use `Array.indexOf` to generate an error with a specific error message.
Switched to `Array.prototype.forEach` to generate the same error.

js/src/jit-test/tests/basic/exception-column-number.js
In this test `Array.indexOf()` is used to generate an error. Since the
exact message doesn't matter, I switched to `Array.from()`.

Intentionally not changed:

editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
Did not modify because this is 3rd-party code and the code uses
feature detection as a fall back when Array generics are not used.

testing/talos/talos/tests/dromaeo/lib/mootools.js
Did not modify because mootools adds the `Array.slice` method to the
`Array` object.

Not changed because they check the implementation of Array generics:
js/src/jit-test/tests/basic/arrayNatives.js
js/src/jit-test/tests/basic/bug563243.js
js/src/jit-test/tests/basic/bug618853.js
js/src/jit-test/tests/basic/bug830967.js
js/src/jit-test/tests/jaeger/recompile/bug656753.js
js/src/jit-test/tests/self-hosting/alternate-static-and-instance-array-extras.js
js/src/tests/non262/Array/generics.js
js/src/tests/non262/Array/regress-415540.js
js/src/tests/non262/extensions/regress-355497.js
js/src/tests/non262/extensions/typedarray-set-neutering.js

Depends on D27802

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:03:19 +00:00
Boris Zbarsky d31e7ee991 Bug 1534593 part 3. Initialize JSObject* entries in Record types. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D27562

--HG--
extra : moz-landing-system : lando
2019-04-16 19:18:52 +00:00
Boris Zbarsky 97cd783174 Bug 1534593 part 2. Factor out the "determine the default initializer" code from dictionary member init and reuse it for sequence member init. r=qdot
The other option would be to implement nsTArrayElementTraits for JSObject* and
null-initialize there.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 19:18:09 +00:00
Boris Zbarsky c377e7f5ae Bug 1534593 part 1. Stop special-casing JS::Value initialization, since JS::Value now always initializes itself on construction. r=jwalden,qdot
Differential Revision: https://phabricator.services.mozilla.com/D27560

--HG--
extra : moz-landing-system : lando
2019-04-16 19:11:40 +00:00
Brian Grinstead 0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00
Brian Grinstead 6515f97bcb Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 20:56:58 +00:00
Sylvestre Ledru 7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Karl Tomlinson 26e9ce40c3 bug 1542932 Add code generation for callback constructors r=bzbarsky
TreatNonObjectAsNull is rejected in the parser because / so that there is no
need to implement the equivalent of CallCallback.getCallGuard().

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

--HG--
extra : moz-landing-system : lando
2019-04-11 20:54:17 +00:00
Boris Zbarsky ext:(%2C%20Karl%20Tomlinson%20%3Ckarlt%2B%40karlt.net%3E) eb7c3dbdf6 Bug 1542932 part 1. Add support for callback constructors in the IDL parser. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D26864

--HG--
extra : moz-landing-system : lando
2019-04-10 20:32:57 +00:00
Boris Zbarsky d0bcf72821 Bug 1543564 part 2. Get rid of pointless nsPIDOMWindowInner::AsInner methods. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27027

--HG--
extra : moz-landing-system : lando
2019-04-11 14:12:43 +00:00
Boris Zbarsky 423697c891 Bug 1543461. Add the missing newline after a static assert in Web IDL codegen. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D26960

--HG--
extra : moz-landing-system : lando
2019-04-10 19:05:15 +00:00
Yoshi Cheng-Hao Huang 222255214e Bug 1534967 - Part 1: use RootedIdVector. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D25042
2019-04-08 10:46:53 +08:00
Boris Zbarsky 6f668b8c00 Bug 1541513 part 3. Stop using AutoJSContext in NativeInterface2JSObject. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26002

--HG--
extra : moz-landing-system : lando
2019-04-04 02:07:53 +00:00
Boris Zbarsky 953426c78f Bug 1541513 part 2. Stop using AutoJSContext in some simple XPCConvert cases. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26000

--HG--
extra : moz-landing-system : lando
2019-04-03 23:33:35 +00:00
Eden Chuang 72b79c6fbd Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug
1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process

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

--HG--
extra : moz-landing-system : lando
2019-04-01 22:42:34 +00:00
Oana Pop Rus dc9eba46cc Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-30 00:05:29 +02:00
Ruihui Yan 2dbc54f868 Bug 1508819 - Enable ESLint for dom/bindings (manual changes). r=nika
Depends on D13891

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

--HG--
extra : moz-landing-system : lando
2019-03-29 16:47:06 +00:00
Ruihui Yan 894c13cd76 Bug 1508819 - Enable ESLint for dom/bindings (automatic changes) r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13891

--HG--
extra : moz-landing-system : lando
2019-03-28 09:11:04 +00:00
André Bargull 20cf72c49d Bug 1538542: Report an error in the transplant testing function when new wrappers can't be created. r=jandem
And also assert this case can't happen in the browser case.

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

--HG--
extra : moz-landing-system : lando
2019-03-28 17:27:49 +00:00
Julian Descottes 04ab3b18ed Bug 1537876 - Augment CSS errors with the CSS selector r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D24894

--HG--
extra : moz-landing-system : lando
2019-03-27 12:12:55 +00:00
Yoshi Cheng-Hao Huang edbc333422 Bug 1521732 - Part 3: Use RootedValueVector instead. r=sfink,jonco
s/AutoValueVector/RootedValueVector/g

Depends on D23183

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

--HG--
extra : moz-landing-system : lando
2019-03-26 13:58:20 +00:00
Boris Zbarsky 93d6619a30 Bug 1539204 part 2. Mark subject principal args in bindings as known-live. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D24927

--HG--
extra : moz-landing-system : lando
2019-03-26 21:57:12 +00:00
Boris Zbarsky 52085cda31 Bug 1539204 part 1. Wrap NonNullHelper() around subject principal args when the stack value is NonNull. r=qdot
This is legwork for adding MOZ_KNOWN_LIVE, because it puts the conversion to
nsIPrincipal& inside the future MOZ_KnownLive.  Most of the changes are just
moving code around a bit and switching prepend() calls for append() calls as a
result.

I have verified that the only change in the generated code is the
addition of NonNullHelper() calls.  A diff of the generated code is available
at <https://phabricator.services.mozilla.com/F1241622>.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 21:56:32 +00:00
Cosmin Sabou 78fc71e3c3 Backed out changeset 7fa7d6e6dedc (bug 1442778) for devtools failures on browser_webconsole_check_stubs_console_api.js CLOSED TREE 2019-03-26 20:27:55 +02:00
Jeff Walden c40e81a2e9 Bug 1537536 - Move JS::ForOfIterator to its own header. r=arai,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D24257

--HG--
rename : js/src/jsapi.h => js/public/ForOfIterator.h
extra : moz-landing-system : lando
2019-03-26 17:10:44 +00:00
Eden Chuang 5e4df764d9 Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug
1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process

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

--HG--
extra : moz-landing-system : lando
2019-03-26 15:18:20 +00:00
Boris Zbarsky 10d7ccf23e Bug 1535384 part 5. Eliminate MOZ_CAN_RUN_SCRIPT_BOUNDARY for mutation callbacks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23776

--HG--
extra : moz-landing-system : lando
2019-03-19 15:14:11 +00:00
Boris Zbarsky a998830a71 Bug 1535124 part 2. Mark Web IDL callbacks MOZ_CAN_RUN_SCRIPT by default. r=qdot
We add a [MOZ_CAN_RUN_SCRIPT_BOUNDARY] opt-out for now to keep the tree
compiling.  The naming purposefully matches the C++ annotation that has a
similar effect, top make it easy to search for.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 12:59:54 +00:00
Boris Zbarsky 5c13f9c06d Bug 1535124 part 1. Add a MOZ_KnownLive() around callback-typed arguments in bindings. r=qdot
This allows calling a C++ MOZ_CAN_RUN_SCRIPT method that takes a callback argument.

The changes to TestCanRunScript.cpp are there to catch an incorrect change I was
going to make to the analysis to make this work, until I figured out that
RootedCallback should be MOZ_IS_SMARTPTR_TO_REFCOUNTED.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 12:59:53 +00:00
longsonr 21dcb548e6 Bug 1518666 part 2 - Move existing SVGAnimated classes to DOMSVGAnimated so that we can rename various existing classes to SVGAnimated later r=dholbert
--HG--
rename : dom/svg/SVGAnimatedAngle.cpp => dom/svg/DOMSVGAnimatedAngle.cpp
rename : dom/svg/SVGAnimatedAngle.h => dom/svg/DOMSVGAnimatedAngle.h
rename : dom/svg/SVGAnimatedBoolean.cpp => dom/svg/DOMSVGAnimatedBoolean.cpp
rename : dom/svg/SVGAnimatedBoolean.h => dom/svg/DOMSVGAnimatedBoolean.h
rename : dom/svg/SVGAnimatedEnumeration.cpp => dom/svg/DOMSVGAnimatedEnumeration.cpp
rename : dom/svg/SVGAnimatedEnumeration.h => dom/svg/DOMSVGAnimatedEnumeration.h
rename : dom/svg/SVGAnimatedInteger.cpp => dom/svg/DOMSVGAnimatedInteger.cpp
rename : dom/svg/SVGAnimatedInteger.h => dom/svg/DOMSVGAnimatedInteger.h
rename : dom/svg/SVGAnimatedLength.cpp => dom/svg/DOMSVGAnimatedLength.cpp
rename : dom/svg/SVGAnimatedLength.h => dom/svg/DOMSVGAnimatedLength.h
rename : dom/svg/SVGAnimatedNumber.cpp => dom/svg/DOMSVGAnimatedNumber.cpp
rename : dom/svg/SVGAnimatedNumber.h => dom/svg/DOMSVGAnimatedNumber.h
rename : dom/svg/SVGAnimatedString.cpp => dom/svg/DOMSVGAnimatedString.cpp
rename : dom/svg/SVGAnimatedString.h => dom/svg/DOMSVGAnimatedString.h
2019-03-19 00:01:03 +00:00
Sebastian Hengst cee711baf9 Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi
Differential Revision: https://phabricator.services.mozilla.com/D23546

--HG--
extra : moz-landing-system : lando
2019-03-17 23:13:22 +00:00
Boris Zbarsky f992dd0ee2 Bug 1535647 followup. Adjust the WebIDL parser tests for not supporting nullable constants. r=bzbarsky 2019-03-15 21:12:10 -04:00
Boris Zbarsky 6be51098cc Bug 1535647. Disallow nullable types for WebIDL constants. r=qdot
These got removed from the spec.

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

--HG--
extra : moz-landing-system : lando
2019-03-16 00:37:53 +00:00
Nika Layzell a26325ea58 Bug 1529684 - Part 6: Store a mIsInProcess flag to preserve WindowProxy behaviour, r=farre
Currently when we have an in-process WindowProxy object, we will attempt
to either use the cached mWindowProxy value, or fetch the
nsGlobalWindowOuter object from through the nsDocShell. Unfortunately,
when the BrowsingContext is detached, we will fail to get the
nsGlobalWindowOuter object. This happens to be OK for our test cases, as
the cached mWindowProxy value doesn't have the chance to go away, but
isn't acceptable long-term.

These patches exascerbated that issue by causing the nsDocShell pointer
itself to be cleared when it is destroyed, which caused the Remote
WindowProxy logic to be triggered. To deal with that case, this patch
adds a new mIsInProcess flag to continue to act like the old code-path.

In the future, we will need to also handle ensuring that the
nsGlobalWindowOuter lives for long enough, however that is not being
done in this patch in order to land it sooner rather than later.

Depends on D22763

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

--HG--
extra : moz-landing-system : lando
2019-03-14 18:50:54 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Boris Zbarsky 870c830c5a Bug 1535135. Annotate static binding methods/getters/setters as MOZ_CAN_RUN_SCRIPT. r=qdot
We do this for non-static ones already; we should do it for static ones too.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 20:50:36 +00:00
Brindusan Cristian 86556db730 Backed out 2 changesets (bug 1515214) for hazard build bustage at CallbackObject.cpp. CLOSED TREE
Backed out changeset 7c4973b0d0e8 (bug 1515214)
Backed out changeset 9aabc3ad2470 (bug 1515214)

--HG--
extra : histedit_source : fe9f52b4aa92e6c3aacb62d5eba3807353c20654
2019-03-08 00:04:31 +02:00
Markus Stange 18e5146459 Bug 1515214 - Add CallbackObject::GetDescription. r=bzbarsky
This allows us to create profiler markers whose description contains the name
of the function and its file / line number. This allows the profiler UI to
match up setTimeout callbacks for multiple instances of the same page load, in
order to create meaningful profile comparisons based on markers.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 18:04:43 +00:00
Olli Pettay 37d309e927 Bug 1412485, disable legacy touch APIs on desktop, r=masayuki
Hiding document.createEvent("TouchEvent"), document.createTouch, document.createTouchList and ontouch* event
handlers on desktop to follow what Chrome has done.
This patch explicitly does not remove createTouch or createTouchList everywhere, although those seem to have been
removing already on some other browsers.
Devtools use TOUCHEVENTS_OVERRIDE_ENABLED for touch event testing, and this patch keeps the old behavior per discussion
with devtools devs.

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

--HG--
extra : rebase_source : 562588a289632ba2f11db7f3ac8782c26c3b05f8
2019-03-04 13:35:53 +02:00
Jeff Walden 3f385ffa33 Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D21827

--HG--
extra : rebase_source : 833bbfce12d90bcb92f7cd88ec65247e48c024c0
2019-03-04 15:19:16 -08:00
Razvan Maries 65e4948ca0 Backed out 4 changesets (bug 1532005, bug 1531638) for causing perma fails and Spidermonkey fail. CLOSED TREE
Backed out changeset 4913d941de92 (bug 1532005)
Backed out changeset 9635abe5bf24 (bug 1532005)
Backed out changeset 738cf4b1126a (bug 1532005)
Backed out changeset e5d9f2ee7ac7 (bug 1531638)
2019-03-05 01:07:28 +02:00
Jeff Walden ecb4e10bda Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D21827

--HG--
extra : rebase_source : 36c43233ad6d804bd691c8c40d6a6984331c7162
2019-02-28 17:00:56 -08:00
Manish Goregaokar 8d156cc59b Bug 1359269 - Part 11: Add a bunch of parser tests; r=bzbarsky
Depends on D20061

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:22:12 +00:00
Manish Goregaokar 8d9735ff94 Bug 1359269 - Part 10: Make it a hard error to apply TreatNullAs on non-types; r=bzbarsky
Depends on D20060

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:22:05 +00:00
Manish Goregaokar ab4f69e7a5 Bug 1359269 - Part 9: Clean up codegen now that Clamp/EnforceRange can only be applied to types; r=bzbarsky
Depends on D20059

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:58 +00:00
Manish Goregaokar aa95e97459 Bug 1359269 - Part 8: Make it a hard error to apply type attributes on arguments, attrs, and dict members when it's unambiguous, update webidls; r=bzbarsky
Depends on D20058

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:50 +00:00
Manish Goregaokar 6c5f8594de Bug 1359269 - Part 7: Add ArgumentRest entry to simplify parsing; r=bzbarsky
Depends on D19738

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:48 +00:00
Manish Goregaokar e7706facd8 Bug 1359269 - Part 6: Add support for attributes on types in dictionaries; r=bzbarsky
Depends on D19737

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:41 +00:00
Manish Goregaokar 2df29133e8 Bug 1359269 - Part 5: Add support for attributes on types in arguments; r=bzbarsky
Depends on D19736

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:33 +00:00
Manish Goregaokar 0f83cb4a13 Bug 1359269 - Part 3: Add a codegen test; r=bzbarsky
Depends on D19734

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:24 +00:00
Manish Goregaokar a3792c37f5 Bug 1359269 - Part 2: Add codegen support for attributes on types in WebIDL; r=bzbarsky
Depends on D19733

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:22 +00:00
Manish Goregaokar 0d62c9bcf9 Bug 1359269 - Part 1: Add parser support for attributes on types in WebIDL; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D19733

--HG--
extra : moz-landing-system : lando
2019-03-02 04:21:14 +00:00
Dorel Luca d66ca2b25b Backed out 11 changesets (bug 1359269) for Linting failure. CLOSED TREE
Backed out changeset 00461a29f650 (bug 1359269)
Backed out changeset 6c09eccc4bd1 (bug 1359269)
Backed out changeset ae30401e7988 (bug 1359269)
Backed out changeset 8f9509e82439 (bug 1359269)
Backed out changeset bfb153c7f9c3 (bug 1359269)
Backed out changeset 1430913c5e9e (bug 1359269)
Backed out changeset 4bb00dc53459 (bug 1359269)
Backed out changeset 7705b1ebb154 (bug 1359269)
Backed out changeset 7fd8a3c1f827 (bug 1359269)
Backed out changeset c3f37539cb31 (bug 1359269)
Backed out changeset bb694b612b1b (bug 1359269)
2019-03-02 04:07:00 +02:00
Manish Goregaokar 3919f75414 Bug 1359269 - Part 11: Add a bunch of parser tests; r=bzbarsky
Depends on D20061

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:34 +00:00
Manish Goregaokar e8ca5270f2 Bug 1359269 - Part 10: Make it a hard error to apply TreatNullAs on non-types; r=bzbarsky
Depends on D20060

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:32 +00:00
Manish Goregaokar 8f2ed901bf Bug 1359269 - Part 9: Clean up codegen now that Clamp/EnforceRange can only be applied to types; r=bzbarsky
Depends on D20059

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:30 +00:00
Manish Goregaokar ee96363968 Bug 1359269 - Part 8: Make it a hard error to apply type attributes on arguments, attrs, and dict members when it's unambiguous, update webidls; r=bzbarsky
Depends on D20058

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:28 +00:00
Manish Goregaokar 12f7c20c98 Bug 1359269 - Part 7: Add ArgumentRest entry to simplify parsing; r=bzbarsky
Depends on D19738

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:26 +00:00
Manish Goregaokar f0768f680c Bug 1359269 - Part 6: Add support for attributes on types in dictionaries; r=bzbarsky
Depends on D19737

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:23 +00:00
Manish Goregaokar 1b42f1d75d Bug 1359269 - Part 5: Add support for attributes on types in arguments; r=bzbarsky
Depends on D19736

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:21 +00:00
Manish Goregaokar d9f6bbadd9 Bug 1359269 - Part 3: Add a codegen test; r=bzbarsky
Depends on D19734

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:12 +00:00
Manish Goregaokar e3c91847dd Bug 1359269 - Part 2: Add codegen support for attributes on types in WebIDL; r=bzbarsky
Depends on D19733

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:10 +00:00
Manish Goregaokar aff45bb844 Bug 1359269 - Part 1: Add parser support for attributes on types in WebIDL; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D19733

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:07 +00:00
Boris Zbarsky a67e8bcc52 Bug 1531623. Fix webidl identifier conflicts involving typedefs to produce saner exceptions. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D21647

--HG--
extra : moz-landing-system : lando
2019-03-01 20:38:39 +00:00
Gurzau Raul 6b94d177d1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-01 09:28:28 +02:00
Peter Van der Beken f13ee34fd0 Bug 1518202 - Make RemoteObjectProxies add the edge to the native object to the CC. r=bzbarsky
Depends on D15848

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

--HG--
extra : moz-landing-system : lando
2019-02-28 19:34:02 +00:00
Peter Van der Beken 41fde75dc8 Bug 1518202 - Add cross-process proxies for Location. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15848

--HG--
extra : moz-landing-system : lando
2019-02-28 18:23:15 +00:00
Boris Zbarsky 8c2602c9e5 Bug 1520831. Fix handling of Symbol-named properties on objects with named setters. r=qdot
Per spec these should just go directly to the expando object; we were ignoring them instead.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 19:08:32 +00:00
Boris Zbarsky a76f119a04 Bug 1489308 part 8. Remove unneeded JSContext args on open/write/writeln. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D17326

--HG--
extra : moz-landing-system : lando
2019-02-27 05:12:13 +00:00
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
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Brian Hackett 89247ca139 Bug 1447244 Part 5 - Add source ID to nsIScriptError and ConsoleEvent, r=smaug.
--HG--
extra : rebase_source : df10848e2b61bcff4837602567d518e4b1e316fb
2019-01-16 12:00:38 -10:00
Christoph Kerschbaumer 7c441f1bcb Bug 1518454: Part 1, backend changes, add CSP to loadURIOptions dictionary and pass CSP explicitly from frontend to docshell. r=bz 2019-02-21 16:00:32 +01:00
Nika Layzell 54709dbdd6 Bug 1523631 - Part 5: Avoid GCC warning when including dictionary types in WebIDL, r=bzbarsky
This warning (as an error) is showing up with this patch due to the new
use of AddEventListenerOptions in ChromeUtilsBinding.h. That header is
included in some codegen units which have this warning enabled, which
revealed the issue.

I believe the warning is spurious in this case, but fixing it doesn't
seem like a big deal. Requesting review from Boris, as he added the
comment 6 years ago.

Depends on D20015

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

--HG--
extra : moz-landing-system : lando
2019-02-22 15:48:44 +00:00
Jeff Gilbert d8d7ebde0c Bug 1129354 - Implement draft extension OES_fbo_render_mipmap. r=lsalzman,qdot
Differential Revision: https://phabricator.services.mozilla.com/D20397

--HG--
extra : moz-landing-system : lando
2019-02-22 19:25:20 +00:00
Shivam Singhal 4064daf089 Bug 1528628 - Remove unused JSContext argument of JS_ObjectIsFunction. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D20114

--HG--
extra : moz-landing-system : lando
2019-02-21 20:42:54 +00:00
Boris Zbarsky c898179a08 Bug 1528286. Remove bogus comment. r=froydnj
There are no relocations needed for string constants.

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

--HG--
extra : moz-landing-system : lando
2019-02-15 16:25:06 +00:00
Mike Hommey ef3ad686ee Bug 1512504 - Remove support for MSVC. r=froydnj
Consequently, this removes:
- MOZ_LIBPRIO, which is now always enabled.
- non_msvc_compiler, which is now always true.
- The cl.py wrapper, since it's not used anymore.
- CL_INCLUDES_PREFIX, which was only used for the cl.py wrapper.
- NONASCII, which was only there to ensure CL_INCLUDES_PREFIX still
  worked in non-ASCII cases.

This however keeps a large part of detecting and configuring for MSVC,
because we still do need it for at least headers, libraries, and midl.

Depends on D19614

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

--HG--
extra : moz-landing-system : lando
2019-02-14 21:45:27 +00: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
Logan Smyth e962578670 Bug 1518661 - Part 3: Adjust call-expression positions. r=jimb,jorendorff
When we mark call expressions as breakpoints, we want to make it as likely
as possible that the call has its own unique positon. The existing logic
means that it is more likely that the beginning of a call will align
with the start of an expression statement or other debuggable step point.
By using the property-access location, we're less likely to collide.

Thid also adds a new bytecodes that were missed in the original code that
added this position handling logic.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 02:55:21 +00:00
Andreea Pavel e754faad17 Backed out 3 changesets (bug 1518661) for failing test_promise_rejections_from_jsimplemented.html
Backed out changeset d381785b0c4c (bug 1518661)
Backed out changeset 4a8b38e5373b (bug 1518661)
Backed out changeset 64ebb085a6b3 (bug 1518661)

--HG--
extra : rebase_source : 7e4c5c4cd0b2ea9e48238e6083fdfc01b3f9bd16
2019-02-13 04:27:22 +02:00
Logan Smyth 2efd56750c Bug 1518661 - Part 3: Adjust call-expression positions. r=jimb,jorendorff
When we mark call expressions as breakpoints, we want to make it as likely
as possible that the call has its own unique positon. The existing logic
means that it is more likely that the beginning of a call will align
with the start of an expression statement or other debuggable step point.
By using the property-access location, we're less likely to collide.

Thid also adds a new bytecodes that were missed in the original code that
added this position handling logic.

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

--HG--
extra : moz-landing-system : lando
2019-02-12 23:46:27 +00:00
Thomas Nguyen 92cca5e26c Bug 1517703 - Part 1 - Implement ReferrerInfo class r=smaug
The class contains original full referrer and referrer policy will be
applied to the referrer.

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

--HG--
extra : moz-landing-system : lando
2019-02-12 19:35:32 +00:00
Bogdan Tara 87a0b11003 Merge inbound to mozilla-central. a=merge 2019-02-12 07:25:23 +02:00
Boris Zbarsky bc348929b6 Bug 1515582. Remove the separate XBL scope setup. r=bholley
With these changes, XBL just runs in the window scope of whatever document it's
attached to.  Since (outside of tests and "remote XUL") we no longer attach XBL
to web documents, this is fine.  And "remote XUL" already ran without the XBL
scope.

Native anonymous content, which used to be placed in the XBL scope to hide it
from the page, is now placed in the unprivileged junk scope, so it stays hidden
from the page.

dom/xbl/test/test_bug944407.xul is being removed because we are changing the
behavior it's trying to test for.  Since we now always put the XBL in the same
scope as the page, script is enabled for the XBL if and only if it's enabled for
the page.

dom/base/test/test_bug419527.xhtml, dom/events/test/test_bug391568.xhtml,
dom/xbl/test/test_bug1086996.xhtml are being switched to a chrome test because
otherwise the XBL can't see the getAnonymousNodes method.

All the XBL bits are being removed from test_interfaces because we no longer
have a separate XBL scope to test the behavior of.

js/xpconnect/tests/mochitest/test_nac.xhtml is being removed because XBL no
longer has access to NAC unless the page it's attached to does too, so the test
doesn't really make sense.

layout/xul/test/test_bug1197913.xul is being switched to a chrome test because
its XUL elements use bindings that rely on APIs that are not exposed to normal
web content.

layout/reftests/bugs/495385-2f.xhtml is being removed because I can't think of
a sane way to test that in the new world, short of running the reftest as
chrome.  And it doesn't seem worthwhile to look for a way to do that.

dom/xbl/test/test_bug1098628_throw_from_construct.xhtml now needs to
expectUncaughtException(), because the exception is now being thrown in Window
scope.

dom/xbl/test/test_bug1359859.xhtml needs to expectUncaughtException() as needed
and not use XPCNativeWrapper (which it doesn't need to anyway now).

dom/xbl/test/test_bug389322.xhtml, dom/xbl/test/test_bug400705.xhtml,
dom/xbl/test/test_bug401907.xhtml, dom/xbl/test/test_bug403162.xhtml,
dom/xbl/test/test_bug526178.xhtml, dom/xbl/test/test_bug639338.xhtml don't need
to use XPCNativeWrapper anymore.

dom/xbl/test/test_bug821850.html is being removed because it exists only to test XBL scopes.

dom/xbl/test/file_bug950909.xml is being changed to work without a separate XBL
scope (though whether the test still makes sense at that point is a bit questionable).

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

--HG--
extra : moz-landing-system : lando
2019-02-11 21:51:47 +00:00
Boris Zbarsky afcd9842ec Bug 1525673. Don't assume that same-compartment means same-realm in WrapNewBindingNonWrapperCache. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D18863

--HG--
extra : moz-landing-system : lando
2019-02-11 13:33:23 +00:00
Bogdan Tara dee73f16c3 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-02-12 00:01:16 +02:00
André Bargull b780900930 Bug 1526318: Assert the JSPropertySpec in XrayResolveAttribute has a native accessor function. r=bz 2019-02-08 07:06:42 -08: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
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 aaacae7c45 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 18:49:04 +00:00
Boris Zbarsky d061930645 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-01 18:48:13 +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
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
Jeff Gilbert ac012b5064 Bug 1522018 - Implement webgl draft ext EXT_float_blend. r=lsalzman,qdot
Differential Revision: https://phabricator.services.mozilla.com/D17336

--HG--
rename : dom/canvas/WebGLExtensionBase.cpp => dom/canvas/WebGLExtensions.cpp
extra : moz-landing-system : lando
2019-01-31 23:39:12 +00:00
Boris Zbarsky df186a33e6 Bug 1524041. Update the regexp for Web IDL identifiers to spec changes. r=qdot
See https://github.com/heycam/webidl/issues/632 and
https://github.com/heycam/webidl/pull/633

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

--HG--
extra : moz-landing-system : lando
2019-01-31 19:19:00 +00:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Kris Maglione 2fe0de01dc Bug 1519596: Part 1 - Remove several unnecessary/unused ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16377

--HG--
extra : rebase_source : 6c4311387d25de425806aeb6c4691e12c9fcb855
2019-01-11 16:59:23 -08: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
Jon Coppeard f29d48a0f6 Bug 1306008 - Remove unnecessary expose call in DOMProxyHandler r=bzbarsky
This call is not necessary now that Heap<T> has a pre-barrier which does this automatically.

Differential Revision: https://phabricator.services.mozilla.com/D25086
2019-03-27 16:26:23 +00:00
Jon Coppeard 2674733d06 Bug 1536154 - Update JS_updateMallocCounter callers to use the new API r=bzbarsky
This updates existing callers to use the new JS::AddAssociatedMemory API and adds calls to RemoveAssociatedMemory in finalizers.

The associated memory doesn't need to be exact, so some simplifiations are made, e.g. in CanvasRenderingContext2D where we don't wait for memory to be allocated but update the number of bytes when the dimensions change, and for stream blobs where the value returned by SizeOfIncludingThis changes over the lifetime of the object.

Differential Revision: https://phabricator.services.mozilla.com/D28692
2019-04-24 15:58:42 +01:00
Jon Coppeard b00f4011de Bug 1536154 - Eagerly run finalizer for any dead reflector JSObject when creating a new reflector for a DOM native r=bzbarsky
Currently incremental GC can run the finalizer for a dead reflector for a native after a new reflector for that native has been created and attached. This leads to the confusing situation where there are two reflectors that contain pointers to the same native (which has a pointer to the new one).

This is a problem for memory accounting because the JS engine sees the size of the native at finalization time but does not see updates to this size after a new reflector is created. Thus the engine's idea of the size of a native can become incorrect and the memory accounting can become unbalanced.

Consider the following situation:

1. Native object created of size 20MB
2. Reflector 1 created
3. Reflector 1 becomes unreachable
4. Reflector 2 created
5. Native size changes to 40MB
6. Reflector 1 finalized

The memory associated with reflector 1 will be: 20MB (step 2), -20MB (step 6)

The memory associated with reflector 2 will be: 20MB (step 4), 40MB (step 5)

The memory associated with reflector 1 ends up negative (which should not be possible) and the total is also wrong.

The patch runs the finalizer for any dead reflector when creating a new one. This ensures that finalizer sees the correct state. The native object pointer is cleared when this happens so when the GC later runs the finalizer again it is a no-op. This situation occurs pretty rarely so I don't think there is much overhead to running the finalizer more than once. This also allows us to tighten up the assertions in the finalizer.

Differential Revision: https://phabricator.services.mozilla.com/D28690
2019-04-24 15:58:39 +01:00
Boris Zbarsky 5f472025a2 Bug 1520509. Remove the unused support for CrossOriginWritable=InterfaceName in Web IDL. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D16712

--HG--
extra : moz-landing-system : lando
2019-01-18 22:11:04 +00:00
Boris Zbarsky e5c8ead70a Bug 1363208 part 9. Remove now-unused cross-origin Xray infrastructure. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D15433

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:55 +00:00
Boris Zbarsky 46d5d31b59 Bug 1363208 part 7. Change the Location binding to inherit from MaybeCrossOriginObject. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D15431

--HG--
extra : moz-landing-system : lando
2019-01-21 04:26:13 +00:00
Boris Zbarsky 4dffd37187 Bug 1363208 part 6. Remove the NonOrdinaryGetPrototypeOf annotation. r=peterv
We can just check for a non-global object (so excluding Window) with cross-origin properties.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:16 +00:00
Boris Zbarsky c17e30f6b2 Bug 1363208 part 4. Stop using cross-origin Xrays for WindowProxy. r=peterv,jandem
The change to test_bug440572.html is due to a behavior change.  Specifically,
before this change, any IDL-declared property, even one not exposed
cross-origin, would prevent named frames with that name being visible
cross-origin.  The new behavior is that cross-origin-exposed IDL properties
prevent corresponding frame names from being visible, but ones not exposed
cross-origin don't.  This matches the spec and other browsers.

Same thing for the changes to test_bug860494.xul.

The wpt test changes are just adding test coverage for the thing the other
tests caught.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 03:30:31 +00:00
Boris Zbarsky 79d353e3bc Bug 1363208 part 2. Add a helper class for implementing the HTML requirements for cross-origin-accessible objects. r=jandem,peterv
Differential Revision: https://phabricator.services.mozilla.com/D15425

--HG--
extra : moz-landing-system : lando
2019-01-21 03:28:06 +00:00
Boris Zbarsky 67be15b8fc Bug 1363208 part 1. Add a MaybeWrapObject function that works on JSObject* instead of JS::Value. r=peterv,bholley
Differential Revision: https://phabricator.services.mozilla.com/D15424

--HG--
extra : moz-landing-system : lando
2019-01-21 03:24:42 +00:00
Paolo Amadini 788354b1e7 Bug 1516258 - Part 2 - Remove XULScrollElement. r=NeilDeakin
There is still styling associated with the "scrollbox" element, but eventually those instances can be replaced with simple boxes.

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

--HG--
extra : rebase_source : 1ff8502e01df16e791c06b9cdcbe38fb2b55ccd7
2019-01-10 11:50:31 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Neil Deakin cdf4a288ec Bug 1482389, remove tree box object special case in Codegen.py, r=bz 2019-01-14 20:59:34 -05:00
Neil Deakin cb10352f4b Bug 1482389, replace TreeBoxObject with XULTreeElement inherited from XULElement, r=peterv,paolo
--HG--
rename : dom/webidl/TreeBoxObject.webidl => dom/chrome-webidl/XULTreeElement.webidl
rename : layout/xul/tree/TreeBoxObject.cpp => dom/xul/XULTreeElement.cpp
rename : layout/xul/tree/TreeBoxObject.h => dom/xul/XULTreeElement.h
2018-12-04 11:25:30 -05:00
Jeff Walden 7883beee5b Bug 1517674 - Rename JS_NewDateObject and JS_ObjectIsDate to JS:: versions of the same, and move their declarations to js/public/Date.h and their implementations to js/src/jsdate.cpp. r=arai
--HG--
extra : rebase_source : 581fa2b7831ab09c33801f8e9a52a78566973ff4
2019-01-04 11:43:31 -06:00
Jeff Walden a128f0c35c Bug 1517624 - Move JSPropertySpec and JSFunctionSpec definitions into a new js/public/PropertySpec.h header. r=arai
--HG--
extra : rebase_source : b80911e01f984ee9f99fbbc6c4552ef3d2178587
2019-01-03 15:37:01 -06:00
Jorg K 64e5de9372 Bug 1353867 - Follow-up, take 2: revert rev c9a17c8a3c3f and add include of WindowProxyHolder.h where it was missing. r=bz 2019-01-03 09:11:00 +02:00
Ciure Andrei 7a748ae68f Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-04 01:03:06 +02:00
Boris Zbarsky 3c5a7b2986 Bug 1517415. We might be trying to JS-wrap a BrowsingContext with a torn-down-enough docshell that we have no window. r=nika
The old code did this check in GetContentWindow, basically.  We _could_ just put
the null-check there, but this seems safer.

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

--HG--
extra : moz-landing-system : lando
2019-01-03 20:31:05 +00:00
Peter Van der Beken 066d891adb Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12656

--HG--
extra : moz-landing-system : lando
2019-01-02 13:29:18 +00:00
Peter Van der Beken b816d68b07 Bug 1353867 - Add code generation for array of cross origin properties. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12654

--HG--
extra : moz-landing-system : lando
2019-01-02 13:28:06 +00:00
Peter Van der Beken 58c7fc4d20 Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky
Make the WindowProxyHolder hold a strong reference to a BrowsingContext, as in the future
we might not have a nsPIDOMWindowOuter (if the document is loaded in a different process).

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

--HG--
extra : moz-landing-system : lando
2019-01-02 13:27:05 +00:00
Peter Van der Beken a17049feac Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever
the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder
hold a strong reference to a nsPIDOMWindowOuter.

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

--HG--
extra : moz-landing-system : lando
2019-01-02 13:26:56 +00:00