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

Side by Side Diff: src/runtime.cc

Issue 334233003: Don't bypass the global proxy as the global object should never escape into JS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10892 matching lines...) Expand 10 before | Expand all | Expand 10 after
10903 // entered (if the debugger is entered). The reason for switching context here 10903 // entered (if the debugger is entered). The reason for switching context here
10904 // is that for some property lookups (accessors and interceptors) callbacks 10904 // is that for some property lookups (accessors and interceptors) callbacks
10905 // into the embedding application can occour, and the embedding application 10905 // into the embedding application can occour, and the embedding application
10906 // could have the assumption that its own native context is the current 10906 // could have the assumption that its own native context is the current
10907 // context and not some internal debugger context. 10907 // context and not some internal debugger context.
10908 SaveContext save(isolate); 10908 SaveContext save(isolate);
10909 if (isolate->debug()->in_debug_scope()) { 10909 if (isolate->debug()->in_debug_scope()) {
10910 isolate->set_context(*isolate->debug()->debugger_entry()->GetContext()); 10910 isolate->set_context(*isolate->debug()->debugger_entry()->GetContext());
10911 } 10911 }
10912 10912
10913 // Skip the global proxy as it has no properties and always delegates to the
10914 // real global object.
10915 if (obj->IsJSGlobalProxy()) {
10916 obj = Handle<JSObject>(JSObject::cast(obj->GetPrototype()));
10917 }
10918
10919
10920 // Check if the name is trivially convertible to an index and get the element 10913 // Check if the name is trivially convertible to an index and get the element
10921 // if so. 10914 // if so.
10922 uint32_t index; 10915 uint32_t index;
10923 if (name->AsArrayIndex(&index)) { 10916 if (name->AsArrayIndex(&index)) {
10924 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2); 10917 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2);
10925 Handle<Object> element_or_char; 10918 Handle<Object> element_or_char;
10926 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 10919 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
10927 isolate, element_or_char, 10920 isolate, element_or_char,
10928 Runtime::GetElementOrCharAt(isolate, obj, index)); 10921 Runtime::GetElementOrCharAt(isolate, obj, index));
10929 details->set(0, *element_or_char); 10922 details->set(0, *element_or_char);
(...skipping 4281 matching lines...) Expand 10 before | Expand all | Expand 10 after
15211 } 15204 }
15212 return NULL; 15205 return NULL;
15213 } 15206 }
15214 15207
15215 15208
15216 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15209 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15217 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15210 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15218 } 15211 }
15219 15212
15220 } } // namespace v8::internal 15213 } } // 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