[Webkit-unassigned] [Bug 220842] New: A question about global variables

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 21 23:20:45 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=220842

            Bug ID: 220842
           Summary: A question about global variables
           Product: WebKit
           Version: WebKit Local Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: nisl_grammarly1 at 163.com

#version: dbae081(https://github.com/WebKit/WebKit-http/commit/dbae081ad7e22d9ab61edf2f337f6c2bb593c7f8)

#Testcase:
var x = 4;
Object.defineProperty(this, 'x', {
    writable: false
});
x = 3;
print(x);
print(this.x);

#Command:
./webkit/WebKitBuild/Release/bin/jsc testcase.js

#Output:
3
4

#Expected output:
4
4

#Description:
When executing this test case, since x is not writable (in line 3), other engines (such as v8, SpiderMonkey, chakra, etc.) did not change the value of x, but JavascriptCore successfully changed the value of x to 3. Maybe this is a bug of JavascriptCore.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210122/924a9250/attachment.htm>


More information about the webkit-unassigned mailing list