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

Side by Side Diff: src/runtime/runtime-object.cc

Issue 1186733002: Add %TypedArray% to proto chain (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: changes from arv's review Created 5 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
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/typedarray.js » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 HandleScope scope(isolate); 141 HandleScope scope(isolate);
142 DCHECK(args.length() == 1); 142 DCHECK(args.length() == 1);
143 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); 143 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
144 Handle<Object> result; 144 Handle<Object> result;
145 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 145 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
146 Runtime::GetPrototype(isolate, obj)); 146 Runtime::GetPrototype(isolate, obj));
147 return *result; 147 return *result;
148 } 148 }
149 149
150 150
151 // Set the [[Prototype]] internal slot of an object.
151 RUNTIME_FUNCTION(Runtime_InternalSetPrototype) { 152 RUNTIME_FUNCTION(Runtime_InternalSetPrototype) {
152 HandleScope scope(isolate); 153 HandleScope scope(isolate);
153 DCHECK(args.length() == 2); 154 DCHECK(args.length() == 2);
154 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); 155 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
155 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1); 156 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
156 DCHECK(!obj->IsAccessCheckNeeded()); 157 DCHECK(!obj->IsAccessCheckNeeded());
157 DCHECK(!obj->map()->is_observed()); 158 DCHECK(!obj->map()->is_observed());
158 Handle<Object> result; 159 Handle<Object> result;
159 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 160 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
160 isolate, result, JSObject::SetPrototype(obj, prototype, false)); 161 isolate, result, JSObject::SetPrototype(obj, prototype, false));
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); 1425 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3);
1425 1426
1426 RETURN_FAILURE_ON_EXCEPTION( 1427 RETURN_FAILURE_ON_EXCEPTION(
1427 isolate, 1428 isolate,
1428 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), 1429 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(),
1429 setter, attrs)); 1430 setter, attrs));
1430 return isolate->heap()->undefined_value(); 1431 return isolate->heap()->undefined_value();
1431 } 1432 }
1432 } // namespace internal 1433 } // namespace internal
1433 } // namespace v8 1434 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698