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

Unified Diff: src/runtime/runtime-object.cc

Issue 1254143003: [stubs] Also handle properties of the JSBuiltinsObject in the fast case. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index b9c3fdf1bedbdc09643c164347be4cdf14a92281..07ba01f957ad108153a546656c61ce1d9a418a2f 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -437,8 +437,8 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalViaContext) {
// Switch to fast mode only if there is a data property and it's not on
// a hidden prototype.
- if (LookupIterator::DATA == it.state() &&
- it.GetHolder<Object>()->IsJSGlobalObject()) {
+ if (it.state() == LookupIterator::DATA &&
+ it.GetHolder<Object>().is_identical_to(global_object)) {
// Now update the cell in the script context.
Handle<PropertyCell> cell = it.GetPropertyCell();
script_context->set(slot, *cell);
@@ -469,10 +469,11 @@ Object* StoreGlobalViaContext(Isolate* isolate, int slot, Handle<Object> value,
Handle<Name> name(scope_info->ContextSlotName(slot), isolate);
Handle<GlobalObject> global_object(script_context->global_object(), isolate);
LookupIterator it(global_object, name, LookupIterator::HIDDEN);
+
// Switch to fast mode only if there is a data property and it's not on
// a hidden prototype.
- if (LookupIterator::DATA == it.state() &&
- it.GetHolder<Object>()->IsJSGlobalObject()) {
+ if (it.state() == LookupIterator::DATA &&
+ it.GetHolder<Object>().is_identical_to(global_object)) {
// Now update cell in the script context.
Handle<PropertyCell> cell = it.GetPropertyCell();
script_context->set(slot, *cell);
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698