Commit 0c538ee9 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

Revert "Reserve two in-object properties slots for JSErrors"

This reverts commit 21adacab.

Reason for revert: Breaks Mac64 GC Stress Bot

Original change's description:
> Reserve two in-object properties slots for JSErrors
> 
> The most common use-case for creating errors is "new Error('message')".
> The resulting JSError object has two properties. The message passed to
> the constructor and an accessor for the stack.
> 
> This CL reserves two in-object property slots for these two, so no
> PropertyArray has to be created.
> 
> Bug: v8:9116
> Change-Id: I84467453446f333bf65425807707ee6581894e61
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564195
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60791}

TBR=jgruber@chromium.org,bmeurer@chromium.org,szuend@chromium.org

Change-Id: I4667c4f49b3244d7809e8605b3858e246858a413
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9116
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564200Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60792}
parent 21adacab
...@@ -1312,15 +1312,9 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global, ...@@ -1312,15 +1312,9 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global,
Handle<String> name, int context_index) { Handle<String> name, int context_index) {
Factory* factory = isolate->factory(); Factory* factory = isolate->factory();
// Most Error objects consist of a message and a stack trace. Handle<JSFunction> error_fun = InstallFunction(
// Reserve two in-object properties for these. isolate, global, name, JS_ERROR_TYPE, JSObject::kHeaderSize, 0,
const int kInObjectPropertiesCount = 2; factory->the_hole_value(), Builtins::kErrorConstructor);
const int kErrorObjectSize =
JSObject::kHeaderSize + kInObjectPropertiesCount * kTaggedSize;
Handle<JSFunction> error_fun =
InstallFunction(isolate, global, name, JS_ERROR_TYPE, kErrorObjectSize,
kInObjectPropertiesCount, factory->the_hole_value(),
Builtins::kErrorConstructor);
error_fun->shared()->DontAdaptArguments(); error_fun->shared()->DontAdaptArguments();
error_fun->shared()->set_length(1); error_fun->shared()->set_length(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment