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

Side by Side Diff: src/runtime.cc

Issue 234143002: Remove unnecessary %UnwrapGlobalProxy calls from object-observe.js (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/runtime.h ('k') | 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 14933 matching lines...) Expand 10 before | Expand all | Expand 10 after
14944 // isolate. If it's called more often, the map should be moved into the 14944 // isolate. If it's called more often, the map should be moved into the
14945 // strong root list. 14945 // strong root list.
14946 Handle<Map> map = 14946 Handle<Map> map =
14947 isolate->factory()->NewMap(JS_WEAK_MAP_TYPE, JSWeakMap::kSize); 14947 isolate->factory()->NewMap(JS_WEAK_MAP_TYPE, JSWeakMap::kSize);
14948 Handle<JSWeakMap> weakmap = 14948 Handle<JSWeakMap> weakmap =
14949 Handle<JSWeakMap>::cast(isolate->factory()->NewJSObjectFromMap(map)); 14949 Handle<JSWeakMap>::cast(isolate->factory()->NewJSObjectFromMap(map));
14950 return WeakCollectionInitialize(isolate, weakmap); 14950 return WeakCollectionInitialize(isolate, weakmap);
14951 } 14951 }
14952 14952
14953 14953
14954 RUNTIME_FUNCTION(MaybeObject*, Runtime_UnwrapGlobalProxy) {
14955 SealHandleScope shs(isolate);
14956 ASSERT(args.length() == 1);
14957 Object* object = args[0];
14958 if (object->IsJSGlobalProxy()) {
14959 object = object->GetPrototype(isolate);
14960 if (object->IsNull()) return isolate->heap()->undefined_value();
14961 }
14962 return object;
14963 }
14964
14965
14966 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsAccessAllowedForObserver) { 14954 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsAccessAllowedForObserver) {
14967 HandleScope scope(isolate); 14955 HandleScope scope(isolate);
14968 ASSERT(args.length() == 3); 14956 ASSERT(args.length() == 3);
14969 CONVERT_ARG_HANDLE_CHECKED(JSFunction, observer, 0); 14957 CONVERT_ARG_HANDLE_CHECKED(JSFunction, observer, 0);
14970 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 1); 14958 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 1);
14971 ASSERT(object->map()->is_access_check_needed()); 14959 ASSERT(object->map()->is_access_check_needed());
14972 Handle<Object> key = args.at<Object>(2); 14960 Handle<Object> key = args.at<Object>(2);
14973 SaveContext save(isolate); 14961 SaveContext save(isolate);
14974 isolate->set_context(observer->context()); 14962 isolate->set_context(observer->context());
14975 if (!isolate->MayNamedAccessWrapper(object, 14963 if (!isolate->MayNamedAccessWrapper(object,
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
15238 } 15226 }
15239 } 15227 }
15240 15228
15241 15229
15242 void Runtime::OutOfMemory() { 15230 void Runtime::OutOfMemory() {
15243 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); 15231 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true);
15244 UNREACHABLE(); 15232 UNREACHABLE();
15245 } 15233 }
15246 15234
15247 } } // namespace v8::internal 15235 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698