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

Unified Diff: src/ic.cc

Issue 11347037: Object.observe: generate change records for named properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index dd0bb10e1057ad61f3f162727d1c1a66144178e7..50a3a277a3bfa21746e172a14f9a00b9054a9320 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1377,6 +1377,11 @@ MaybeObject* StoreIC::Store(State state,
return *value;
}
+ // Observed objects are always modified through the runtime.
+ if (FLAG_harmony_observation && receiver->map()->is_observed()) {
+ return receiver->SetProperty(*name, *value, NONE, strict_mode);
+ }
+
// Use specialized code for setting the length of arrays with fast
// properties. Slow properties might indicate redefinition of the
// length property.
@@ -1902,7 +1907,8 @@ MaybeObject* KeyedStoreIC::Store(State state,
}
// Update inline cache and stub cache.
- if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) {
+ if (FLAG_use_ic && !receiver->IsJSGlobalProxy() &&
+ !(FLAG_harmony_observation && receiver->map()->is_observed())) {
LookupResult lookup(isolate());
if (LookupForWrite(receiver, name, &lookup)) {
UpdateCaches(&lookup, state, strict_mode, receiver, name, value);
« no previous file with comments | « src/flag-definitions.h ('k') | src/object-observe.js » ('j') | src/object-observe.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698