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

Side by Side Diff: src/runtime.cc

Issue 21891008: Don't attempt to transition JSProxy to an observed map / Object.getNotifier() must SetObserved (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/object-observe.js ('k') | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 13910 matching lines...) Expand 10 before | Expand all | Expand 10 after
13921 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetIsObserved) { 13921 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetIsObserved) {
13922 SealHandleScope shs(isolate); 13922 SealHandleScope shs(isolate);
13923 ASSERT(args.length() == 1); 13923 ASSERT(args.length() == 1);
13924 CONVERT_ARG_CHECKED(JSReceiver, obj, 0); 13924 CONVERT_ARG_CHECKED(JSReceiver, obj, 0);
13925 if (obj->IsJSGlobalProxy()) { 13925 if (obj->IsJSGlobalProxy()) {
13926 Object* proto = obj->GetPrototype(); 13926 Object* proto = obj->GetPrototype();
13927 if (proto->IsNull()) return isolate->heap()->undefined_value(); 13927 if (proto->IsNull()) return isolate->heap()->undefined_value();
13928 ASSERT(proto->IsJSGlobalObject()); 13928 ASSERT(proto->IsJSGlobalObject());
13929 obj = JSReceiver::cast(proto); 13929 obj = JSReceiver::cast(proto);
13930 } 13930 }
13931 if (obj->IsJSProxy())
13932 return isolate->heap()->undefined_value();
13933
13931 ASSERT(!(obj->map()->is_observed() && obj->IsJSObject() && 13934 ASSERT(!(obj->map()->is_observed() && obj->IsJSObject() &&
13932 JSObject::cast(obj)->HasFastElements())); 13935 JSObject::cast(obj)->HasFastElements()));
13933 ASSERT(obj->IsJSObject()); 13936 ASSERT(obj->IsJSObject());
13934 return JSObject::cast(obj)->SetObserved(isolate); 13937 return JSObject::cast(obj)->SetObserved(isolate);
13935 } 13938 }
13936 13939
13937 13940
13938 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetObserverDeliveryPending) { 13941 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetObserverDeliveryPending) {
13939 SealHandleScope shs(isolate); 13942 SealHandleScope shs(isolate);
13940 ASSERT(args.length() == 0); 13943 ASSERT(args.length() == 0);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
14158 // Handle last resort GC and make sure to allow future allocations 14161 // Handle last resort GC and make sure to allow future allocations
14159 // to grow the heap without causing GCs (if possible). 14162 // to grow the heap without causing GCs (if possible).
14160 isolate->counters()->gc_last_resort_from_js()->Increment(); 14163 isolate->counters()->gc_last_resort_from_js()->Increment();
14161 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14164 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14162 "Runtime::PerformGC"); 14165 "Runtime::PerformGC");
14163 } 14166 }
14164 } 14167 }
14165 14168
14166 14169
14167 } } // namespace v8::internal 14170 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698