Bug 86128 - Error stack should not be read only
Summary: Error stack should not be read only
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 86523 (view as bug list)
Depends on: 86442
Blocks: 85057
  Show dependency treegraph
 
Reported: 2012-05-10 12:29 PDT by Erik Arvidsson
Modified: 2021-04-21 14:18 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2012-05-10 12:29:21 PDT
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.
Comment 1 Alexey Shvayka 2019-06-17 14:50:25 PDT
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
}
Comment 2 Sam Weinig 2021-04-21 14:18:08 PDT
*** Bug 86523 has been marked as a duplicate of this bug. ***