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

Unified Diff: src/api.cc

Issue 9716035: Make setting of accessors even more atomic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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/objects.h » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index c852b97964916c618094685e64220d3a243134ca..3515b7565bc27793d9ec339d68a092f496d1b96c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3065,7 +3065,9 @@ bool Object::SetAccessor(Handle<String> name,
getter, setter, data,
settings, attributes);
i::Handle<i::Object> result = i::SetAccessor(Utils::OpenHandle(this), info);
- return !result.is_null() && !result->IsUndefined();
+ if (result.is_null() || result->IsUndefined()) return false;
+ i::JSObject::TransformToFastProperties(Utils::OpenHandle(this), 0);
Michael Starzinger 2012/03/21 12:33:08 It would be nice not to have this code duplicated
Sven Panne 2012/03/21 13:14:18 Well, C++'s abstraction capabilities are extremely
+ return true;
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698