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

Unified Diff: src/runtime.cc

Issue 274163002: Harden %SetIsObserved with RUNTIME_ASSERTs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed lint Created 6 years, 7 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 | test/mjsunit/es7/object-observe-runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 143b8707d5cac4661909572f6ebc3967e8ced89d..ac8f6eb79ed979a7362fa7c78f125faccded3dd9 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -14855,9 +14855,9 @@ RUNTIME_FUNCTION(Runtime_SetIsObserved) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0);
- ASSERT(!obj->IsJSGlobalProxy());
- if (obj->IsJSProxy())
- return isolate->heap()->undefined_value();
+ RUNTIME_ASSERT(!obj->IsJSGlobalProxy());
+ if (obj->IsJSProxy()) return isolate->heap()->undefined_value();
+ RUNTIME_ASSERT(!obj->map()->is_observed());
ASSERT(obj->IsJSObject());
JSObject::SetObserved(Handle<JSObject>::cast(obj));
« no previous file with comments | « no previous file | test/mjsunit/es7/object-observe-runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698