Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: src/accessors.cc

Issue 368783006: Treat ExecutableAccessorInfo as regular data properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ic.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 6ade56aaee7ad3d1eb09240194b44d4d5e7d3da7..eb7e372851ae8c4a377c696066beee59bc0c5e4b 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -191,16 +191,7 @@ void Accessors::ArrayLengthSetter(
Handle<JSObject> object = Handle<JSObject>::cast(
Utils::OpenHandle(*info.This()));
Handle<Object> value = Utils::OpenHandle(*val);
- // This means one of the object's prototypes is a JSArray and the
- // object does not have a 'length' property. Calling SetProperty
- // causes an infinite loop.
- if (!object->IsJSArray()) {
- MaybeHandle<Object> maybe_result =
- JSObject::SetOwnPropertyIgnoreAttributes(
- object, isolate->factory()->length_string(), value, NONE);
- maybe_result.Check();
- return;
- }
+ ASSERT(object->IsJSArray());
value = FlattenNumber(isolate, value);
@@ -871,13 +862,7 @@ static Handle<Object> SetFunctionPrototype(Isolate* isolate,
function = Handle<JSFunction>(function_raw, isolate);
}
- if (!function->should_have_prototype()) {
- // Since we hit this accessor, object will have no prototype property.
- MaybeHandle<Object> maybe_result =
- JSObject::SetOwnPropertyIgnoreAttributes(
- receiver, isolate->factory()->prototype_string(), value, NONE);
- return maybe_result.ToHandleChecked();
- }
+ ASSERT(function->should_have_prototype());
Handle<Object> old_value;
bool is_observed = *function == *receiver && function->map()->is_observed();
« no previous file with comments | « no previous file | src/ic.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698