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

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: 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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index ed6ce930677df13c4bf57316de9cfa9f5a3f464e..31502f364024cf413d9b69ee34eb711b2e89688b 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -14897,9 +14897,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') | test/mjsunit/es7/object-observe-runtime.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698