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

Side by Side Diff: src/runtime.cc

Issue 93863006: Revert "Load the global proxy from the context of the target function." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/ia32/stub-cache-ia32.cc ('k') | src/runtime.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 9234 matching lines...) Expand 10 before | Expand all | Expand 10 after
9245 9245
9246 // Otherwise, if the slot was found the holder is a context extension 9246 // Otherwise, if the slot was found the holder is a context extension
9247 // object, subject of a with, or a global object. We read the named 9247 // object, subject of a with, or a global object. We read the named
9248 // property from it. 9248 // property from it.
9249 if (!holder.is_null()) { 9249 if (!holder.is_null()) {
9250 Handle<JSReceiver> object = Handle<JSReceiver>::cast(holder); 9250 Handle<JSReceiver> object = Handle<JSReceiver>::cast(holder);
9251 ASSERT(object->IsJSProxy() || JSReceiver::HasProperty(object, name)); 9251 ASSERT(object->IsJSProxy() || JSReceiver::HasProperty(object, name));
9252 // GetProperty below can cause GC. 9252 // GetProperty below can cause GC.
9253 Handle<Object> receiver_handle( 9253 Handle<Object> receiver_handle(
9254 object->IsGlobalObject() 9254 object->IsGlobalObject()
9255 ? Object::cast(isolate->heap()->the_hole_value()) 9255 ? GlobalObject::cast(*object)->global_receiver()
9256 : object->IsJSProxy() ? static_cast<Object*>(*object) 9256 : object->IsJSProxy() ? static_cast<Object*>(*object)
9257 : ComputeReceiverForNonGlobal(isolate, JSObject::cast(*object)), 9257 : ComputeReceiverForNonGlobal(isolate, JSObject::cast(*object)),
9258 isolate); 9258 isolate);
9259 9259
9260 // No need to unhole the value here. This is taken care of by the 9260 // No need to unhole the value here. This is taken care of by the
9261 // GetProperty function. 9261 // GetProperty function.
9262 MaybeObject* value = object->GetProperty(*name); 9262 MaybeObject* value = object->GetProperty(*name);
9263 return MakePair(value, *receiver_handle); 9263 return MakePair(value, *receiver_handle);
9264 } 9264 }
9265 9265
(...skipping 5625 matching lines...) Expand 10 before | Expand all | Expand 10 after
14891 // Handle last resort GC and make sure to allow future allocations 14891 // Handle last resort GC and make sure to allow future allocations
14892 // to grow the heap without causing GCs (if possible). 14892 // to grow the heap without causing GCs (if possible).
14893 isolate->counters()->gc_last_resort_from_js()->Increment(); 14893 isolate->counters()->gc_last_resort_from_js()->Increment();
14894 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14894 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14895 "Runtime::PerformGC"); 14895 "Runtime::PerformGC");
14896 } 14896 }
14897 } 14897 }
14898 14898
14899 14899
14900 } } // namespace v8::internal 14900 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698