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

Side by Side Diff: src/runtime.cc

Issue 159323003: Switch to use MayNamedAccess() in Runtime. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | 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 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 1604
1605 1605
1606 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) { 1606 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) {
1607 HandleScope scope(isolate); 1607 HandleScope scope(isolate);
1608 ASSERT(args.length() == 1); 1608 ASSERT(args.length() == 1);
1609 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); 1609 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
1610 // We don't expect access checks to be needed on JSProxy objects. 1610 // We don't expect access checks to be needed on JSProxy objects.
1611 ASSERT(!obj->IsAccessCheckNeeded() || obj->IsJSObject()); 1611 ASSERT(!obj->IsAccessCheckNeeded() || obj->IsJSObject());
1612 do { 1612 do {
1613 if (obj->IsAccessCheckNeeded() && 1613 if (obj->IsAccessCheckNeeded() &&
1614 !isolate->MayNamedAccessWrapper(Handle<JSObject>::cast(obj), 1614 !isolate->MayNamedAccess(JSObject::cast(*obj),
1615 isolate->factory()->proto_string(), 1615 *isolate->factory()->proto_string(),
1616 v8::ACCESS_GET)) { 1616 v8::ACCESS_GET)) {
1617 isolate->ReportFailedAccessCheck(JSObject::cast(*obj), v8::ACCESS_GET); 1617 isolate->ReportFailedAccessCheck(JSObject::cast(*obj), v8::ACCESS_GET);
1618 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 1618 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
1619 return isolate->heap()->undefined_value(); 1619 return isolate->heap()->undefined_value();
1620 } 1620 }
1621 obj = handle(obj->GetPrototype(isolate), isolate); 1621 obj = handle(obj->GetPrototype(isolate), isolate);
1622 } while (obj->IsJSObject() && 1622 } while (obj->IsJSObject() &&
1623 JSObject::cast(*obj)->map()->is_hidden_prototype()); 1623 JSObject::cast(*obj)->map()->is_hidden_prototype());
1624 return *obj; 1624 return *obj;
1625 } 1625 }
1626 1626
(...skipping 13237 matching lines...) Expand 10 before | Expand all | Expand 10 after
14864 // Handle last resort GC and make sure to allow future allocations 14864 // Handle last resort GC and make sure to allow future allocations
14865 // to grow the heap without causing GCs (if possible). 14865 // to grow the heap without causing GCs (if possible).
14866 isolate->counters()->gc_last_resort_from_js()->Increment(); 14866 isolate->counters()->gc_last_resort_from_js()->Increment();
14867 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14867 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14868 "Runtime::PerformGC"); 14868 "Runtime::PerformGC");
14869 } 14869 }
14870 } 14870 }
14871 14871
14872 14872
14873 } } // namespace v8::internal 14873 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698