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

Side by Side Diff: src/builtins.cc

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | src/debug.cc » ('j') | 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/base/once.h" 9 #include "src/base/once.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 1159 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
1160 isolate, fun_data, 1160 isolate, fun_data,
1161 isolate->factory()->ConfigureInstance( 1161 isolate->factory()->ConfigureInstance(
1162 fun_data, Handle<JSObject>::cast(args.receiver()))); 1162 fun_data, Handle<JSObject>::cast(args.receiver())));
1163 } 1163 }
1164 1164
1165 SharedFunctionInfo* shared = function->shared(); 1165 SharedFunctionInfo* shared = function->shared();
1166 if (shared->strict_mode() == SLOPPY && !shared->native()) { 1166 if (shared->strict_mode() == SLOPPY && !shared->native()) {
1167 Object* recv = args[0]; 1167 Object* recv = args[0];
1168 ASSERT(!recv->IsNull()); 1168 ASSERT(!recv->IsNull());
1169 if (recv->IsUndefined()) { 1169 if (recv->IsUndefined()) args[0] = function->global_proxy();
1170 args[0] = function->context()->global_object()->global_receiver();
1171 }
1172 } 1170 }
1173 1171
1174 Object* raw_holder = TypeCheck(heap, args.length(), &args[0], *fun_data); 1172 Object* raw_holder = TypeCheck(heap, args.length(), &args[0], *fun_data);
1175 1173
1176 if (raw_holder->IsNull()) { 1174 if (raw_holder->IsNull()) {
1177 // This function cannot be called with the given receiver. Abort! 1175 // This function cannot be called with the given receiver. Abort!
1178 Handle<Object> obj = 1176 Handle<Object> obj =
1179 isolate->factory()->NewTypeError( 1177 isolate->factory()->NewTypeError(
1180 "illegal_invocation", HandleVector(&function, 1)); 1178 "illegal_invocation", HandleVector(&function, 1));
1181 return isolate->Throw(*obj); 1179 return isolate->Throw(*obj);
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 } 1711 }
1714 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1712 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1715 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1713 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1716 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 1714 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
1717 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1715 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1718 #undef DEFINE_BUILTIN_ACCESSOR_C 1716 #undef DEFINE_BUILTIN_ACCESSOR_C
1719 #undef DEFINE_BUILTIN_ACCESSOR_A 1717 #undef DEFINE_BUILTIN_ACCESSOR_A
1720 1718
1721 1719
1722 } } // namespace v8::internal 1720 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698