Bug 220842
| Summary: | A question about global variables | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | NWU_NISL <nisl_grammarly1> |
| Component: | JavaScriptCore | Assignee: | Alexey Shvayka <ashvayka> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ashvayka, fpizlo, keith_miller, mark.lam, nwu_ty, smoley, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | PC | ||
| OS: | Linux | ||
NWU_NISL
#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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/73686367>
Yusuke Suzuki
@Alexey maybe this is the same to https://bugs.webkit.org/show_bug.cgi?id=203456 ?
Alexey Shvayka
(In reply to Yusuke Suzuki from comment #2)
> @Alexey maybe this is the same to
> https://bugs.webkit.org/show_bug.cgi?id=203456 ?
Yeah, that's right, thanks.
I wish we could remove JSGlobalObject::defineOwnProperty() though...
*** This bug has been marked as a duplicate of bug 203456 ***
Yusuke Suzuki
(In reply to Alexey Shvayka from comment #3)
> (In reply to Yusuke Suzuki from comment #2)
> > @Alexey maybe this is the same to
> > https://bugs.webkit.org/show_bug.cgi?id=203456 ?
>
> Yeah, that's right, thanks.
> I wish we could remove JSGlobalObject::defineOwnProperty() though...
Yeah :)
>
> *** This bug has been marked as a duplicate of bug 203456 ***