mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Eagerly define interfaces on non-Window globals (#36604)
These changes make us match Gecko's setup for how Window and non-Window globals are initialized. Since Window globals are much more common than Worker globals, using lazy interface definitions can be a useful memory optimization at the expense of increased complexity for property lookups. Also adds the MayResolve hook for all globals, which is an optimization for the JIT to avoid calling resolve hooks unnecessarily. Testing: Existing test coverage on global interfaces should suffice. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
436dee8450
commit
76ee127af8
10 changed files with 138 additions and 35 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#window
|
||||
[Global=Window, Exposed=Window /*, LegacyUnenumerableNamedProperties */]
|
||||
[Global=Window, Exposed=Window, LegacyUnenumerableNamedProperties, NeedResolve]
|
||||
/*sealed*/ interface Window : GlobalScope {
|
||||
// the current browsing context
|
||||
[LegacyUnforgeable, CrossOriginReadable] readonly attribute WindowProxy window;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue