OLD | NEW |
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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 ArrayPrototypeHasNoElements(heap, native_context, array_proto); | 365 ArrayPrototypeHasNoElements(heap, native_context, array_proto); |
366 } | 366 } |
367 | 367 |
368 | 368 |
369 MUST_USE_RESULT static MaybeObject* CallJsBuiltin( | 369 MUST_USE_RESULT static MaybeObject* CallJsBuiltin( |
370 Isolate* isolate, | 370 Isolate* isolate, |
371 const char* name, | 371 const char* name, |
372 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) { | 372 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) { |
373 HandleScope handleScope(isolate); | 373 HandleScope handleScope(isolate); |
374 | 374 |
375 Handle<Object> js_builtin = | 375 Handle<Object> js_builtin = Object::GetProperty( |
376 GetProperty(Handle<JSObject>(isolate->native_context()->builtins()), | 376 isolate, |
377 name).ToHandleChecked(); | 377 handle(isolate->native_context()->builtins(), isolate), |
| 378 name).ToHandleChecked(); |
378 Handle<JSFunction> function = Handle<JSFunction>::cast(js_builtin); | 379 Handle<JSFunction> function = Handle<JSFunction>::cast(js_builtin); |
379 int argc = args.length() - 1; | 380 int argc = args.length() - 1; |
380 ScopedVector<Handle<Object> > argv(argc); | 381 ScopedVector<Handle<Object> > argv(argc); |
381 for (int i = 0; i < argc; ++i) { | 382 for (int i = 0; i < argc; ++i) { |
382 argv[i] = args.at<Object>(i + 1); | 383 argv[i] = args.at<Object>(i + 1); |
383 } | 384 } |
384 Handle<Object> result; | 385 Handle<Object> result; |
385 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 386 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
386 isolate, result, | 387 isolate, result, |
387 Execution::Call(isolate, | 388 Execution::Call(isolate, |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1748 } | 1749 } |
1749 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1750 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
1750 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1751 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
1751 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1752 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
1752 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1753 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
1753 #undef DEFINE_BUILTIN_ACCESSOR_C | 1754 #undef DEFINE_BUILTIN_ACCESSOR_C |
1754 #undef DEFINE_BUILTIN_ACCESSOR_A | 1755 #undef DEFINE_BUILTIN_ACCESSOR_A |
1755 | 1756 |
1756 | 1757 |
1757 } } // namespace v8::internal | 1758 } } // namespace v8::internal |
OLD | NEW |