OLD | NEW |
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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 | 1564 |
1565 | 1565 |
1566 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) { | 1566 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) { |
1567 HandleScope scope(isolate); | 1567 HandleScope scope(isolate); |
1568 ASSERT(args.length() == 1); | 1568 ASSERT(args.length() == 1); |
1569 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); | 1569 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); |
1570 // We don't expect access checks to be needed on JSProxy objects. | 1570 // We don't expect access checks to be needed on JSProxy objects. |
1571 ASSERT(!obj->IsAccessCheckNeeded() || obj->IsJSObject()); | 1571 ASSERT(!obj->IsAccessCheckNeeded() || obj->IsJSObject()); |
1572 do { | 1572 do { |
1573 if (obj->IsAccessCheckNeeded() && | 1573 if (obj->IsAccessCheckNeeded() && |
1574 !isolate->MayNamedAccessWrapper(obj, | 1574 !isolate->MayNamedAccessWrapper(Handle<JSObject>::cast(obj), |
1575 isolate->factory()->proto_string(), | 1575 isolate->factory()->proto_string(), |
1576 v8::ACCESS_GET)) { | 1576 v8::ACCESS_GET)) { |
1577 isolate->ReportFailedAccessCheck(JSObject::cast(*obj), v8::ACCESS_GET); | 1577 isolate->ReportFailedAccessCheck(JSObject::cast(*obj), v8::ACCESS_GET); |
1578 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 1578 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
1579 return isolate->heap()->undefined_value(); | 1579 return isolate->heap()->undefined_value(); |
1580 } | 1580 } |
1581 obj = handle(obj->GetPrototype(isolate), isolate); | 1581 obj = handle(obj->GetPrototype(isolate), isolate); |
1582 } while (obj->IsJSObject() && | 1582 } while (obj->IsJSObject() && |
1583 JSObject::cast(*obj)->map()->is_hidden_prototype()); | 1583 JSObject::cast(*obj)->map()->is_hidden_prototype()); |
1584 return *obj; | 1584 return *obj; |
(...skipping 13221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14806 // Handle last resort GC and make sure to allow future allocations | 14806 // Handle last resort GC and make sure to allow future allocations |
14807 // to grow the heap without causing GCs (if possible). | 14807 // to grow the heap without causing GCs (if possible). |
14808 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14808 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14809 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14809 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14810 "Runtime::PerformGC"); | 14810 "Runtime::PerformGC"); |
14811 } | 14811 } |
14812 } | 14812 } |
14813 | 14813 |
14814 | 14814 |
14815 } } // namespace v8::internal | 14815 } } // namespace v8::internal |
OLD | NEW |