WebKit Bugzilla
Attachment 357852 Details for
Bug 165171
: Add support for globalThis
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-165171-20181220130107.patch (text/plain), 4.85 KB, created by
Keith Miller
on 2018-12-20 13:01:08 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Keith Miller
Created:
2018-12-20 13:01:08 PST
Size:
4.85 KB
patch
obsolete
>Subversion Revision: 239460 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d439e4be00ad606874f469978daaaa8cca32245c..ca14d70a00698627e55d5a5a3d17d7e9ecc6133d 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-20 Keith Miller <keith_miller@apple.com> >+ >+ Add support for globalThis >+ https://bugs.webkit.org/show_bug.cgi?id=165171 >+ >+ Reviewed by Mark Lam. >+ >+ This patch adds support for the globalThis property on the global >+ object. The globalThis property spec is in stage three and is >+ quite simple. For reference: http://tc39.github.io/proposal-global/ >+ >+ * runtime/JSGlobalObject.cpp: >+ > 2018-12-20 Joseph Pecoraro <pecoraro@apple.com> > > ITMLKit Inspector: Elements tab does not show DOM Tree >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >index a4fb84ccdef3c47a03d20e0e200f7776db0e3999..e86e82cfc6621c2a3493079bf8a429e64f58510d 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >@@ -302,6 +302,7 @@ const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { > encodeURI globalFuncEncodeURI DontEnum|Function 1 > encodeURIComponent globalFuncEncodeURIComponent DontEnum|Function 1 > EvalError JSGlobalObject::m_evalErrorConstructor DontEnum|CellProperty >+ globalThis JSGlobalObject::m_globalThis DontEnum|CellProperty > ReferenceError JSGlobalObject::m_referenceErrorConstructor DontEnum|CellProperty > SyntaxError JSGlobalObject::m_syntaxErrorConstructor DontEnum|CellProperty > URIError JSGlobalObject::m_URIErrorConstructor DontEnum|CellProperty >diff --git a/LayoutTests/js/globalThis-is-window-expected.txt b/LayoutTests/js/globalThis-is-window-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..da4aafcc976a357928aba3226a914e72fc621561 >--- /dev/null >+++ b/LayoutTests/js/globalThis-is-window-expected.txt >@@ -0,0 +1,11 @@ >+This test checks that the globalThis property is the same as the window object >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS globalThis is window >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+PASS globalThis is window >+ >diff --git a/LayoutTests/js/globalThis-is-window.html b/LayoutTests/js/globalThis-is-window.html >new file mode 100644 >index 0000000000000000000000000000000000000000..573aff35287eb673ab0053b2bafe30c0edac0ffa >--- /dev/null >+++ b/LayoutTests/js/globalThis-is-window.html >@@ -0,0 +1,36 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../resources/js-test-pre.js"></script> >+</head> >+<body> >+<script> >+ >+description( >+ "This test checks that the globalThis property is the same as the window object" >+); >+ >+// testRunner.waitUntilDone(); >+ >+shouldBe("globalThis", "window"); >+if (globalThis !== window) >+ testFailed("globalThis !== window in the global scope"); >+ >+if (eval("globalThis !== window")) >+ testFailed("globalThis !== window in an eval scope"); >+ >+</script> >+ >+<script type="module"> >+shouldBe("globalThis", "window"); >+if (globalThis !== window) >+ testFailed("globalThis !== window in the global module scope"); >+ >+if (eval("globalThis !== window")) >+ testFailed("globalThis !== window in an eval module scope"); >+</script> >+ >+ >+<script src="../resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index d4fb2a194a385e575dd5a974158719f020f56046..54771be4d5695e2518dbb661bfb76e7d79f13dba 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,12 @@ >+2018-12-20 Keith Miller <keith_miller@apple.com> >+ >+ Add support for globalThis >+ https://bugs.webkit.org/show_bug.cgi?id=165171 >+ >+ Reviewed by Mark Lam. >+ >+ * test262/config.yaml: >+ > 2018-12-19 Keith Miller <keith_miller@apple.com> > > Update test262 configuration to not run tests dependent on ICU version. >diff --git a/JSTests/test262/config.yaml b/JSTests/test262/config.yaml >index 91c7dcb52de28218ff61ce83f5b18d3f0ba51b00..0bf6d95438efba76a2faf9ab68ac9d6465b3140e 100644 >--- a/JSTests/test262/config.yaml >+++ b/JSTests/test262/config.yaml >@@ -48,10 +48,6 @@ skip: > # https://bugs.webkit.org/show_bug.cgi?id=186691 > - test/built-ins/Reflect/ownKeys/return-on-corresponding-order-large-index.js > >- # https://bugs.webkit.org/show_bug.cgi?id=186785 >- - test/built-ins/global/global-object.js >- - test/built-ins/global/property-descriptor.js >- > # https://bugs.webkit.org/show_bug.cgi?id=192920 > - test/intl402/PluralRules/prototype/resolvedOptions/order.js > - test/intl402/PluralRules/prototype/resolvedOptions/pluralCategories.js
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 165171
:
295668
|
295677
|
295680
|
295682
|
295703
|
297576
|
357848
|
357849
| 357852