Bug 86128
| Summary: | Error stack should not be read only | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Erik Arvidsson <arv> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | ashvayka, barraclough, beidson, oliver, saam |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 86442 | ||
| Bug Blocks: | 85057 | ||
Erik Arvidsson
Both SpiderMonkey and V8 allows the stack property of error objects to be written to.
try {
throw new Error;
} catch (ex) {
ex.stack = 42;
console.assert(e.stack === 42);
}
JSC fails because it treats stack as a read only property.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Shvayka
This is fixed as of rev. 246497. Property descriptor of "stack":
{
"value": "global code\\nevaluateWithScopeExtension@[native code]\\n\\n_wrapCall",
"writable": true, // !
"enumerable": false,
"configurable": true
}
Sam Weinig
*** Bug 86523 has been marked as a duplicate of this bug. ***