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

545595 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky d226db3321 Bug 1371259 followup. Fix rooting analysis hazards in UnwrapObjectInternal. r=peterv pending 2017-07-10 18:04:49 -04:00
Wes Kocher 8185294d28 Backed out 2 changesets (bug 1370752) for failures in test_ext_storage.js a=backout
Backed out changeset 42d3c1599af5 (bug 1370752)
Backed out changeset 9c4bf59ab966 (bug 1370752)

MozReview-Commit-ID: 4M6DsJvJ6RI
2017-07-10 14:34:56 -07:00
Lars T Hansen 814a1042c6 Bug 1373414 - Backout wasm work stealing on JS helper threads. r=shu
--HG--
extra : rebase_source : 8b1dbd5f5885d41c281da137496ac5e268f4029c
extra : source : 55393d7d4f5d8a0d6258cc3035f418a05ba40aea
2017-07-07 16:03:39 -07:00
Wes Kocher b43f3b0d25 Backed out 2 changesets (bug 1344751) for frequent android crashes in test_fetch_cors_sw_reroute.html a=backout
Backed out changeset ec02a5ecb2b4 (bug 1344751)
Backed out changeset 10c975d4a8f9 (bug 1344751)

MozReview-Commit-ID: GauB18HNj15
2017-07-10 14:17:35 -07:00
Boris Zbarsky 66481a7a29 Bug 1371259 part 9. Make UnwrapReflectorToISupports return already_AddRefed<nsISupports>. r=peterv
The main reason to not do this would be performance (avoiding the
addref/release), but there are two main mitigating factors:

1)  All calls to UnwrapReflectorToISupports that pass in a Web IDL object
    already do the addref (and in fact QI).  So this only affects the
    XPCWrappedNative case.

2)  The vast majority of the callers proceed to QI on the pointer anyway, and a
    second addref is cheap; it's the first addref after a CC that can be
    expensive on a cycle-collected object.

Going through the changes one by one:

* In GlobalObject::GetAsSupports, we do have a change that slightly slows down
  precisely in the XPCWrappedNative global case.  That's the message managers
  and the backstagepass.  And this really only affects calls to Web IDL statics
  from those globals.

* In UnwrapArgImpl we're talking about a Web IDL method taking an "external
  interface" type, and the UnwrapReflectorToISupports call is immediately
  followed by QI anyway.

* In UnwrapXPConnectImpl we're talking about the case when we have a
  non-WebIDL-object implementation of a Web IDL interface.  Again, this is the
  message manager globals, for EventTarget.  And we have a QI call immediately
  after the UnwrapReflectorToISupports.

* In the generated HasInstance hook for EventTarget we will be slightly slower
  when the LHS of the instanceof is an XPCWrappedNative.  And not much slower,
  because again there's an immediate QI.

* In InstallXBLField we're never going to have an XPCWrappedNative as thisObj;
  it's always an Element in practice.  So this is no more expensive than before.

* In sandbox's GetPrincipalOrSOP we now have an extra addref.  But it was
  followed by various QIs anyway.

* In XPCConvert::JSValToXPCException we have an extra addref if someone throws
  an XPCWrappedNative, which is fairly unlikely; our actual Exception objects
  are on Web IDL bindings.  Plus we have an immediate QI.

* In xpc::HasInstance we have an extra addred if the LHS of instanceof is an
  XPCWrappedNative.  But, again, there's an immediated QI after the
  UnwrapReflectorToISupports.

* In xpcJSWeakReference::Init we are likely doing an extra addref, but again
  immediately followed by QI.

I think it's worth making this change just to remove the footgun and that the
perf impact, if any, is pretty minimal.
2017-07-10 16:05:26 -04:00
Boris Zbarsky 9cdb2834a8 Bug 1371259 part 8. Get rid of nsIXPConnect::GetNativeOfWrapper. r=peterv
Most of these changes are just replacements of GetNativeOfWrapper with
UnwrapReflectorToISupports, which is all it did under the hood.

The other changes are as follows:

* In nsDOMClassInfo, we really care whether we have a window, so we can just
  UNWRAP_OBJECT to the Window interface, since Window is always on Web IDL
  bindings now.  Also, the weird compartment check hasn't been needed ever since
  GetNativeOfWrapper stopped returning things off the passed-in object's
  prototype chain (Firefox 22, bug 658909).
* The only use of do_QueryWrapper was to get a Window in nsDocument; again we
  can UNWRAP_OBJECT.
* In XPCJSRuntime, we again just want to check for a Window, so UNWRAP_OBJECT.
2017-07-10 16:05:25 -04:00
Boris Zbarsky c524a4da7c Bug 1371259 part 7. Root the unwrapped object in XPCConvert code. r=mccr8 2017-07-10 16:05:25 -04:00
Boris Zbarsky fa152ffab7 Bug 1371259 part 6. Root the unwrapped object in PRE_HELPER_STUB. r=mccr8 2017-07-10 16:05:25 -04:00
Boris Zbarsky 6761a93bcb Bug 1371259 part 5. Use a safer implementation of IsFileList. r=peterv 2017-07-10 16:05:25 -04:00
Boris Zbarsky cdd8fe10d4 Bug 1371259 part 4. Stop using UnwrapArg to unwrap this values. r=peterv 2017-07-10 16:05:25 -04:00
Boris Zbarsky 5c76874a46 Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv
I did audit all UNWRAP_OBJECT callers to make sure that the lifetimes of all the
temporary Rooted or the RefPtrs they unwrap into are long enough.
2017-07-10 16:05:24 -04:00
Boris Zbarsky 5fd161c633 Bug 1371259 part 2. Change union conversions for non-owning unions to pass a MutableHandle through to the underlying conversion code. r=peterv 2017-07-10 16:05:24 -04:00
Boris Zbarsky 6ed5936b6b Bug 1371259 part 1. Pass maybe-mutable Value handles, not JSObject*, into CastableObjectUnwrapper. r=peterv
The idea is that CastableObjectUnwrapper will want to have a MutableHandle for
the thing it's unwrapping whenever its target is a raw pointer.  Since we have
convenient MutableHandle<Value> in most cases, it's easier to switch
CastableObjectUnwrapper to working with MutableHandle<Value> or Handle<Value>
instead of trying to get MutableHandle<JSObject*> in the right places.

There are basically two changes here:

1) Make CastableObjectUnwrapper work with at thing that looks like a Value.
2) Change various callsites to pass in MutableHandle<Value>, in addition to a
   Handle<Value>, into the JS-to-C++ conversion templates.  The
   MutableHandle<Value> is passed as ${maybeMutableVal}.  It may not actually
   end up being a MutableHandle in some cases.

The reason for passing both a Handle and a MutableHandle is that when the thing
we actually have is a Rooted named "foo" the Handle will be "foo" but the
MutableHandle is most naturally written as "&foo".  This is not a problem if
you're just passing it through, but if you want to test whether it's an object,
say, you have a problem.  Writing "foo.isObject()" is ok, but "&foo.isObject()"
is not, and neither is "(&foo).isObject()".  This could be worked around by
passing the MutableHandle as "JS::MutableHandle<JS::Value>(&foo)" or something,
and then "JS::MutableHandle<JS::Value>(&foo).isObject()" does work.  But it
makes the code very hard to read.

So we just pass both things along; ${val} should be used for readonly access and
${maybeMutableVal} any time you really want a MutableHandle.
2017-07-10 16:05:24 -04:00
Andrea Marchesini b92fb666a1 Bug 1375659 - FetchConsumer must check if the operation has been aborted before starting, r=bkelly 2017-07-10 22:07:44 +02:00
Michael Layzell 912e6a35f2 Bug 1378201 - Improve the performance of TableRowsCollection, r=ehsan
MozReview-Commit-ID: 4joB73SXNGA
2017-07-10 15:54:55 -04:00
Micah Tigley 585c654fe0 Bug 1372745 - Add a pref for max rows/columns for grid outline to render. r=gl
MozReview-Commit-ID: HRlQdEdP5aV
2017-07-06 20:04:02 -06:00
L. David Baron 57e3e8641f Bug 1343715 - Remove nsA[C]String::SetDataFlags. r=dmajor
MozReview-Commit-ID: EDQbH9pZKtZ

--HG--
extra : transplant_source : %FA%16%DC%A2C%DAM%F8%AC9%B6%F3d%DF%9E%5B%80%99%7E%B3
2017-07-10 12:23:11 -07:00
L. David Baron 715cb90c8e Bug 1343715 - Split nsTSubstring::mFlags into separate variables for class and data flags (rust bindings changes). r=mystor
Thanks to Manish for help in reflecting this idiomatically in rust.

MozReview-Commit-ID: 8tB7vsc5yxc

--HG--
extra : transplant_source : F%87%16%82.P%BD%F3%B1%A4%19%BA%F0%3DQ%F6%ED%BD%95%60
2017-07-10 12:23:11 -07:00
L. David Baron c59666d841 Bug 1343715 - Split nsTSubstring::mFlags into separate variables for class and data flags. r=dmajor
MozReview-Commit-ID: JW1p5BxpHKA

--HG--
extra : transplant_source : %20e%CF%FA%60%A2%1Bn%1A%C6%A2%DBAy%3C%E0b%0C%077
2017-07-10 12:23:10 -07:00
L. David Baron 539cb0d5a7 Bug 1343715 - Use SetDataFlags in ForgetSharedBuffer. r=dmajor
I believe this should fix some incorrect clearing of F_CLASS_FIXED.

MozReview-Commit-ID: 4ga2NEM9M5Z

--HG--
extra : transplant_source : %ECF%CF%D0%F6%19%9F%24%86%EFR%CAVZ%ED%60%D5nU%D8
2017-07-10 12:23:10 -07:00
Kris Maglione a835678477 Bug 1370752: Part 3 - Use structured clone rather than JSON to sanitize storage values. r=aswan
This gives us performance wins in sevaral areas:

- Creating a structured clone blob of storage data directly from the source
  compartment allows us to avoid X-ray and JSON serialization overhead when
  storing new values.

- Storing the intermediate StructuredCloneBlob, rather than JSON values,
  in-memory saves us additional JSON and structured clone overhead when
  passing the values to listeners and API callers, and saves us a fair amount
  of memory to boot.

- Serializing storage values before sending them over a message manager allows
  us to deserialize them directly into an extension scope on the other side,
  saving us a lot of additional structured clone overhead and intermediate
  garbage generation.

- Using JSONFile.jsm for storage lets us consolidate multiple storage file
  write operations, rather than performing a separate JSON serialization for
  each individual storage write.

- Additionally, this paves the way for us to transition to IndexedDB as a
  storage backend, with full support for arbitrary structured-clone-compatible
  data structures.

MozReview-Commit-ID: JiRE7EFMYxn

--HG--
extra : rebase_source : 04a5681c604c5d2acd781b7ce4f66a757465071a
2017-06-29 14:11:05 -07:00
Kris Maglione 45acce829f Bug 1370752: Part 2 - Allow fallback serializer when JSON.serialize fails. r=aswan
Currently, we need to be able to handle serializing non-JSON-compatible
objects without catastrophically failing to save the storage file. Ideally, we
would ensure this in the ordinary toJSON method. However, that would require
a unnecessary extra calls to JSON.stringify for each object that needs to be
sanitized before returning a JSON-safe value, which is more expensive than we
can afford.

The fallback toJSONSafe method allows us to do this only when necessary, due
to an initial failed JSON serialization.

MozReview-Commit-ID: JXQ001dOGtW

--HG--
extra : rebase_source : 0b7b388316fdc464b47cdd4f7d8c70bc906a9c27
2017-06-09 18:19:11 -07:00
Andrea Marchesini bded2d68fd Bug 1374047 - Keep WebSocketImpl alive before calling DisconnectInternal. r=smaug
--HG--
extra : rebase_source : 89a230a93132029be40dd620ac29a6698e88790f
2017-07-10 15:19:36 -04:00
Sebastian Hengst 22d94d1020 Bug 1376857 - Port events/test_focus_dialog.html to browser tests: remove trailing whitespace to make eslint happy. r=eslint-fix 2017-07-10 20:39:59 +02:00
Dragana Damjanovic 2c3c0ba057 Bug 1363716 - disable TFO if pmls64.dll and rlls64.dll are detected. r=mcmanus 2017-07-10 20:35:02 +02:00
Dragana Damjanovic a6dd35dede Bug 1377897 - If a HalfOpen can be Abndoned we need to check if mEnt is still present before setting mDoNotDestroy. r=mcmanus 2017-07-10 20:30:58 +02:00
Jon Coppeard 6fca503292 Bug 1367795 - Use multiple parallel tasks for weak cache sweeping r=sfink 2017-07-10 18:33:20 +01:00
Jon Coppeard 0b761a51d2 Bug 1367795 - Use a single parallel task for weak cache sweeping r=sfink 2017-07-10 18:33:02 +01:00
Jon Coppeard aa387d5c99 Bug 1367795 - Add tests for incremental weak cache sweeping r=sfink 2017-07-10 18:32:40 +01:00
Jon Coppeard da86f951f4 Bug 1367795 - Move weak cache sweeping out of the initial slice for the sweep group r=sfink 2017-07-10 18:32:25 +01:00
Jon Coppeard 9392176f58 Bug 1367795 - Allow movable cell hashing to handle matching against a dead table entry r=sfink 2017-07-10 18:31:41 +01:00
Jon Coppeard c383e59bed Bug 1367795 - Refactor movable cell hashing methods to move them to MovableCellHasher<T> r=sfink 2017-07-10 18:29:55 +01:00
Jon Coppeard eb6ab2cb17 Bug 1367795 - Add barriers to JS::WeakCache for GCHashMap r=sfink 2017-07-10 18:28:07 +01:00
Jon Coppeard 7f6cdb57e8 Bug 1367795 - Add barriers to JS::WeakCache for GCHashSet r=sfink 2017-07-10 18:27:43 +01:00
Jon Coppeard af750debd2 Bug 1367795 - Specialise JS::WeakCache for GCHashMap so we can add barriers r=sfink 2017-07-10 18:25:57 +01:00
Jon Coppeard d59d472223 Bug 1367795 - Specialise JS::WeakCache for GCHashSet so we can add barriers r=sfink 2017-07-10 18:25:40 +01:00
Jon Coppeard 8fbc82a162 Bug 1367795 - Refactor some use of WeakCache r=sfink 2017-07-10 18:24:16 +01:00
Eitan Isaacson 1d691b821d Bug 1376857 - Port events/test_focus_dialog.html to browser tests. r=yzen 2017-07-10 09:55:18 -07:00
Eitan Isaacson b4a6856e19 Bug 1376857 - Port events/test_{docload,focus_browserui}.xul to browser tests. r=yzen 2017-07-10 09:55:18 -07:00
Eitan Isaacson 1784cc6d45 Bug 1376852 - Port bounds/test_zoom{,_text}.html r=yzen 2017-07-10 09:55:17 -07:00
Botond Ballo 60d852855e Bug 1326686 - Only use the most recent refresh time as the start time of an AsyncScroll when the refresh driver is under test control. r=kip
MozReview-Commit-ID: FkyJfbaPPVl

--HG--
extra : rebase_source : 58ea615484a54b74b76f17e859136cf371b7c05f
2017-01-20 19:28:29 -05:00
Andrew Osmond 491f63197d Bug 1370209 - Allow setting --disable-rust-debug when --enable-debug is used. r=froydnj 2017-07-10 10:46:31 -04:00
André Bargull b6817f5d89 Bug 1379222 - Avoid [[Get]] for "prototype" property when calling builtin constructors. r=jandem
--HG--
extra : rebase_source : f2a369851a66b880eb693bdea8b53aafb0c1f00b
2017-07-10 04:55:54 -07:00
Sebastian Hengst adabab920b Backed out changeset ed18b5a361f9 (bug 1379098) for timing out in a11y's accessible/tests/mochitest/events/test_valuechange.html and browser-chrome's accessible/tests/browser/e10s/browser_caching_value.js. r=backout 2017-07-10 16:02:38 +02:00
Paolo Amadini dace1e001b Bug 1377793 - Fix scrolling in the non-Photon main menu on Windows. r=Gijs
This is a follow-up to the previous patch, required because on Windows we cannot measure the full height of the main view until it is visible.

MozReview-Commit-ID: 2pfYwMLPYIb

--HG--
extra : rebase_source : 0391a619f551b5e100688ea231d12ac26e0868c8
2017-07-09 16:05:03 +01:00
Dragana Damjanovic d03de10389 Bug 1222633 - Web tests for rel=preload: 1) make resources cachable, 2) append some text to the uris to remove the influence of cached resources from previous tests. r=smaug
--HG--
rename : testing/web-platform/tests/content-security-policy/support/Ahem.ttf => testing/web-platform/tests/content-security-policy/support/Ahem2.ttf
rename : testing/web-platform/tests/media/A4.ogv => testing/web-platform/tests/preload/resources/A4.ogv
rename : testing/web-platform/tests/fonts/CanvasTest.ttf => testing/web-platform/tests/preload/resources/CanvasTest.ttf
rename : testing/web-platform/tests/media/foo.vtt => testing/web-platform/tests/preload/resources/foo.vtt
rename : testing/web-platform/tests/media/sound_5.oga => testing/web-platform/tests/preload/resources/sound_5.oga
rename : testing/web-platform/tests/media/white.mp4 => testing/web-platform/tests/preload/resources/white.mp4
2017-07-10 15:06:05 +02:00
Dragana Damjanovic dd.mozilla@gmail.com 0bd7a2c931 Bug 1222633 - Add rel=preload - dom part. r=smaug 2017-07-10 15:05:56 +02:00
Dragana Damjanovic dd.mozilla@gmail.com 4a4943b2d5 Bug 1222633 - Add rel=preload - tests. r=smaug 2017-07-10 15:05:48 +02:00
Dragana Damjanovic dd.mozilla@gmail.com b1784ff670 Bug 1222633 - nsPrefetchService should not cancel rel=preload if the load ends. r=smaug 2017-07-10 15:05:41 +02:00
Dragana Damjanovic 135d43201f Bug 1222633 - Web tests changes that incorporate new semantics of "as" attribute. r=smaug 2017-07-10 15:05:31 +02:00