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

7913 Коммитов

Автор SHA1 Сообщение Дата
Tom Schuster 436fcfbe71 Bug 1658308 - Backout Array.prototype.item and %TypedArray%.prototype.item.
There are too many web compatibility issues. Keeping this on Nightly is not going
to be useful.

Differential Revision: https://phabricator.services.mozilla.com/D92987
2020-10-08 19:34:08 +00:00
Gijs Kruitbosch 41e01e0273 Bug 1667245 - collect telemetry when we would have shown the slow script modal dialog for parent process hangs, r=mccr8,esmyth
Differential Revision: https://phabricator.services.mozilla.com/D91745
2020-10-07 22:49:43 +00:00
Bobby Holley daf490c526 Bug 1669556 - Remove nsIXPCScriptable enumerate hook. r=mccr8
NewEnumerate is used, but Enumerate isn't.

Differential Revision: https://phabricator.services.mozilla.com/D92685
2020-10-07 20:06:18 +00:00
Bobby Holley e3c690c7da Bug 1669556 - Miscellaneous dead code removal. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92684
2020-10-07 20:06:16 +00:00
Bobby Holley 80dc7d0169 Bug 1669556 - Simplify FilteringWrapper. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92683
2020-10-07 20:06:13 +00:00
Bobby Holley ca99f17aad Bug 1669556 - Simplify PreCreate handling WrapperFactory. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92682
2020-10-07 20:06:06 +00:00
Bobby Holley 347101914e Bug 1669556 - Remove XrayUtils::HasNativeProperty. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92681
2020-10-07 20:06:03 +00:00
Tooru Fujisawa 12a7a5ef4b Bug 1666683 - Part 12: Add JS::CheckCompileOptionsMatch and check options in ScriptPreloader. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92414
2020-10-06 21:18:30 +00:00
Tooru Fujisawa eeec119a7e Bug 1666683 - Part 10: Check CompileOptions when decoding XDR. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D92412
2020-10-06 21:17:23 +00:00
Tooru Fujisawa 6ab3eef906 Bug 1666683 - Part 6: Add ScriptPreloader::FillCompileOptionsForCachedScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92408
2020-10-06 21:16:57 +00:00
Tooru Fujisawa 436f86f9a2 Bug 1666683 - Part 5: Add options parameter to nsXPConnect::ReadScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92407
2020-10-07 04:46:55 +00:00
Tooru Fujisawa cecfd1a80f Bug 1666683 - Part 4: Add options parameter to ReadCachedScript in mozJSLoaderUtils. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92406
2020-10-06 21:16:42 +00:00
Tooru Fujisawa f1c1132d55 Bug 1666683 - Part 3: Add options parameter to ScriptPreloader::GetCachedScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92405
2020-10-06 21:16:35 +00:00
Tooru Fujisawa 1bbf424a35 Bug 1666683 - Part 2: Add CompileOptions parameter to JS::DecodeScript, as a placeholder. r=tcampbell
This adds the parameter, without using it, also without passing the correct
value.
The later patch will change the consumer of those API to pass the correct value,
and then use the passed parameter.

Differential Revision: https://phabricator.services.mozilla.com/D92404
2020-10-06 21:16:22 +00:00
Kris Maglione 14b628d060 Bug 1664547: Hold mSaveMonitor while changing mCacheInvalidated. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D91985
2020-09-30 21:30:39 +00:00
Kris Maglione 9feb23a7d6 Bug 1610246: Don't spawn a second save thread when one already exists. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D91990
2020-09-30 22:30:13 +00:00
André Bargull 7e04b39310 Bug 1668785: Remove using declarations from namespace level in Proxy.h. r=mgaudet
The `using` declarations in "Proxy.h" make it act like a second
"NamespaceImports.h", introducing names from `JS` into the `js` namespace.

Remove the `using` declarations from "Proxy.h" and then fix up the breakage by:
- Prepend `JS::` in various header files.
- Add "NamespaceImports.h" in cpp files.
- Add `PropertyDescriptor` to "NamespaceImports.h". There are many unqualified
  references to `PropertyDescriptor`, making it a prime candidate for
  "NamespaceImports.h".

Drive-by changes:
- Use local variables in `CheckProxyFlags()` to make the `static_assert`
  conditions more readable.

Differential Revision: https://phabricator.services.mozilla.com/D92207
2020-10-02 12:51:03 +00:00
Gerald Squelart ee701f64d7 Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 11:02:23 +00:00
Bogdan Tara ababae891b Backed out 2 changesets (bug 1667915) for platform related bustage CLOSED TREE
Backed out changeset e7a0788a1741 (bug 1667915)
Backed out changeset d34505b2d81b (bug 1667915)
2020-10-01 12:34:39 +03:00
Gerald Squelart e07ae06a1d Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 01:44:47 +00:00
Ryan Hunt 33b1e95109 Bug 1664361 - wasm: Add function-references configuration option and runtime flag. r=lth
This commit adds the boilerplate machinery for the function-references proposal. The
interesting piece is that the GC proposal is moved to require the function-references
proposal to be enabled.

The configuration machinery for features is refactored in this commit to avoid passing
6 different booleans around as parameters to functions.
 * A FeatureArgs struct is added with values for all 'feature' configuration options
   - A feature is defined as an option that affects validation or semantics
   - Essentially everything besides 'debug', 'mode', 'tier'
 * All feature configuration responsibility is removed from CompilerEnvironment
 * ModuleEnvironment is modified to accept a FeatureArgs in addition to a
   CompilerEnvironment
   - The CompilerEnvironment field may eventually be removed, as it's not needed
     within function validation, and is only used by the compilers later

Differential Revision: https://phabricator.services.mozilla.com/D89857
2020-09-28 19:18:48 +00:00
Florian Quèze 55e7194f29 Bug 1667272 - Add profiler markers when Services are loaded, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D91459
2020-09-28 15:12:14 +00:00
Christoph Kerschbaumer 359ca7017e Bug 1666419: Assert IsSafeToRunScript. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D91391
2020-09-28 06:29:44 +00:00
Tom Schuster 4859a3db51 Bug 1658308 - Implement Array.prototype.item and %TypedArray%.prototype.item in Nightly. r=anba
We don't implement String.prototype.item: https://github.com/tc39/proposal-item-method/issues/20

Differential Revision: https://phabricator.services.mozilla.com/D90732
2020-09-26 20:54:59 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Kris Maglione 6315798344 Bug 1663747: Part 2 - Use PastShutdownPhase() in component loader shutdown checks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89810
2020-09-22 00:58:02 +00:00
Mihai Alexandru Michis a9f468308c Backed out 2 changesets (bug 1663747) for causing xpcshell failures in ThrottledEventQueue.
CLOSED TREE

Backed out changeset 643aa6baf458 (bug 1663747)
Backed out changeset 491472fe44f4 (bug 1663747)
2020-09-22 03:54:59 +03:00
Kris Maglione 230ad04844 Bug 1663747: Part 2 - Use PastShutdownPhase() in component loader shutdown checks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89810
2020-09-21 19:20:42 +00:00
Sylvestre Ledru ec8859e69e Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90793
2020-09-20 10:14:09 +00:00
Doug Thayer 025f5fb9f0 Bug 1656261 - Back out all recent StartupCache work r=RyanVM
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D90096
2020-09-14 17:00:53 +00:00
Gerald Squelart a087b2df35 Bug 1663554 - Convert AUTO_PROFILER_TEXT_MARKER_... to new AUTO_PROFILER_MARKER_TEXT - r=gregtatum
The name `AUTO_PROFILER_MARKER_TEXT` is more consistent with the equivalent non-`AUTO` macro, and similarly arguments have been re-ordered to be the same, i.e.: Name, category&options, text.

The different macros with different argument sets can now be collapsed into one macro, and the optional arguments (timing, inner window id, backtrace) can easily be added to the `MarkerOptions` where needed.

As a bonus, a specific start time can optionally be provided at construction time.

Differential Revision: https://phabricator.services.mozilla.com/D89588
2020-09-11 00:42:51 +00:00
Tooru Fujisawa 0a00eddff0 Bug 1664182 - Add JS::SetUseOffThreadParseGlobal and js::UseOffThreadParseGlobal, replacing JS::ContextOptions::setUseOffThreadParseGlobal. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D89784
2020-09-10 16:05:39 +00:00
Tooru Fujisawa 68d7cb31bf Bug 1663889 - Remove JS::CompileForNonSyntacticScope and set CompileOptions in caller. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D89688
2020-09-10 15:00:36 +00:00
Simon Giesecke 254c759317 Bug 1663924 - Create single-element arrays in-place. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D89601
2020-09-10 10:15:05 +00:00
Andrew McCreight bff4fd6721 Bug 1663690, part 2 - Inline mozJSComponentLoader::ReallyInit(). r=kmag
This method only asserts that mInitialized is false, then sets
mInitialized to true. All call sites check that the flag is false,
so the assertion is redundant, so this method can be inlined
and simplified.

Differential Revision: https://phabricator.services.mozilla.com/D89480
2020-09-09 19:03:51 +00:00
Andrew McCreight 33ddd4eb56 Bug 1663690, part 1 - Remove ComponentLoaderInfo::EnsureKey(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D89479
2020-09-09 19:03:49 +00:00
Razvan Maries c20f78dd7e Backed out 2 changesets (bug 1663690) for build bustages on mozJSComponentLoader.cpp. CLOSED TREE
Backed out changeset 04236fadb4cc (bug 1663690)
Backed out changeset 3def11143e6c (bug 1663690)
2020-09-09 21:05:54 +03:00
Andrew McCreight dbaf62267d Bug 1663690, part 2 - Inline mozJSComponentLoader::ReallyInit(). r=kmag
This method only asserts that mInitialized is false, then sets
mInitialized to true. All call sites check that the flag is false,
so the assertion is redundant, so this method can be inlined
and simplified.

Differential Revision: https://phabricator.services.mozilla.com/D89480
2020-09-08 18:43:22 +00:00
Andrew McCreight 02d01fc48b Bug 1663690, part 1 - Remove ComponentLoaderInfo::EnsureKey(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D89479
2020-09-08 18:41:39 +00:00
Jeff Walden 45d8047ca9 Bug 1663365 - Move JSM environment-related functionality to its own header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89335
2020-09-08 22:57:01 +00:00
Jeff Walden 5c5e824b56 Bug 1663365 - Move allocation-logging functions and |JS_COUNT_{CTOR,DTOR}| into a separate header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89334
2020-09-08 22:56:56 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Jeff Walden 5608660da2 Bug 1663365 - Move |XrayJitInfo| functionality to its own friend header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89331
2020-09-08 22:51:10 +00:00
Jeff Walden b5ec4c7eba Bug 1663365 - Create a new js/public/String.h header seeded with the inline string functions previously found in jsfriendapi.h. (More functions ought be added/moved here, but these make a good start.) r=jandem,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D89330
2020-09-08 22:50:52 +00:00
Andrew McCreight ff2f7c0866 Bug 1663315 - Don't load new JSMs during shutdown. r=kmag
Under unknown circumstances, we can end up running chrome
JS during thread manager shutdown. Sometimes this ends up
trying to load new JSMs, but gJarHandler has already been
cleared, leading to a crash.

To avoid this and other issues, this patch forbids the
importing of new JSMs after we're late enough in shutdown
to have cleared the ClearOnShutdown pointers. I allow the
importing of JSMs that have already been loaded, as that
seems like it should be okay.

Differential Revision: https://phabricator.services.mozilla.com/D89477
2020-09-08 19:36:27 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Olli Pettay b163d0ab51 Bug 1661812 - Consider to use longer timeout for slow script warning if there isn't any important user input pending r=mccr8,geckoview-reviewers,snorp
The patch converts the relevant prefs to use StaticPrefList and let's content JS in child processes to run longer if there
aren't mousedown/ups or keyevents or such. mousemove or wheel aren't considered as important events.

Differential Revision: https://phabricator.services.mozilla.com/D88668
2020-09-01 07:21:26 +00:00
Jan de Mooij 46f865b1a5 Bug 1661930 - Add GetScriptTranscodingBuildId and use it for both XDR and bytecode cache MIME type. r=nbp,tcampbell
This lets us include some extra flags in the MIME type that's used by the bytecode
cache. It also simplifies the XDR code a bit.

The approach is similar to Wasm's GetOptimizedEncodingBuildId.

Differential Revision: https://phabricator.services.mozilla.com/D88726
2020-08-31 19:38:31 +00:00
Tooru Fujisawa 6eecdba324 Bug 1662140 - Add javascript.options.off_thread_parse_global pref and --no-off-thread-parse-global shell option. r=tcampbell
This adds the preference, JS shell option, and {ContextOptions,CompileOptions} fields,
but the value isn't read and the code always acts as it's set to true.

Differential Revision: https://phabricator.services.mozilla.com/D88922
2020-08-31 23:32:14 +00:00
Simon Giesecke ff85972891 Bug 1661476 - Prevent Result<const V, E> or Result<V, const E> from being instantiated. r=froydnj
Also, remove the existing uses of Result<const nsCString, nsresult> in URLPreloader
and Result<CryptoScheme, const nsCString> in SampleIterator.

Differential Revision: https://phabricator.services.mozilla.com/D88419
2020-08-28 14:16:35 +00:00