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

Side by Side Diff: src/builtins.cc

Issue 1497483004: [proxies] Make Array.isArray respect proxies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years 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/builtins.h ('k') | src/js/array.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 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/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 1416
1417 Handle<JSArray> result_array; 1417 Handle<JSArray> result_array;
1418 if (Fast_ArrayConcat(isolate, &args).ToHandle(&result_array)) { 1418 if (Fast_ArrayConcat(isolate, &args).ToHandle(&result_array)) {
1419 return *result_array; 1419 return *result_array;
1420 } 1420 }
1421 if (isolate->has_pending_exception()) return isolate->heap()->exception(); 1421 if (isolate->has_pending_exception()) return isolate->heap()->exception();
1422 return Slow_ArrayConcat(&args, isolate); 1422 return Slow_ArrayConcat(&args, isolate);
1423 } 1423 }
1424 1424
1425 1425
1426 // ES6 section 22.1.2.2 Array.isArray
1427 BUILTIN(ArrayIsArray) {
1428 HandleScope scope(isolate);
1429 DCHECK_EQ(2, args.length());
1430 Handle<Object> object = args.at<Object>(1);
1431 Maybe<bool> result = Object::IsArray(object);
1432 MAYBE_RETURN(result, isolate->heap()->exception());
1433 return *isolate->factory()->ToBoolean(result.FromJust());
1434 }
1435
1436
1426 // ES6 section 26.1.3 Reflect.defineProperty 1437 // ES6 section 26.1.3 Reflect.defineProperty
1427 BUILTIN(ReflectDefineProperty) { 1438 BUILTIN(ReflectDefineProperty) {
1428 HandleScope scope(isolate); 1439 HandleScope scope(isolate);
1429 DCHECK_EQ(4, args.length()); 1440 DCHECK_EQ(4, args.length());
1430 Handle<Object> target = args.at<Object>(1); 1441 Handle<Object> target = args.at<Object>(1);
1431 Handle<Object> key = args.at<Object>(2); 1442 Handle<Object> key = args.at<Object>(2);
1432 Handle<Object> attributes = args.at<Object>(3); 1443 Handle<Object> attributes = args.at<Object>(3);
1433 1444
1434 if (!target->IsJSReceiver()) { 1445 if (!target->IsJSReceiver()) {
1435 THROW_NEW_ERROR_RETURN_FAILURE( 1446 THROW_NEW_ERROR_RETURN_FAILURE(
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 2442 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
2432 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 2443 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
2433 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 2444 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
2434 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 2445 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
2435 #undef DEFINE_BUILTIN_ACCESSOR_C 2446 #undef DEFINE_BUILTIN_ACCESSOR_C
2436 #undef DEFINE_BUILTIN_ACCESSOR_A 2447 #undef DEFINE_BUILTIN_ACCESSOR_A
2437 2448
2438 2449
2439 } // namespace internal 2450 } // namespace internal
2440 } // namespace v8 2451 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/js/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698