| OLD | NEW |
| 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/api.h" | 5 #include "src/api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
| 9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
| 10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
| (...skipping 2553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2564 value <= i::kMaxUInt32 && | 2564 value <= i::kMaxUInt32 && |
| 2565 value == i::FastUI2D(i::FastD2UI(value)); | 2565 value == i::FastUI2D(i::FastD2UI(value)); |
| 2566 } | 2566 } |
| 2567 return false; | 2567 return false; |
| 2568 } | 2568 } |
| 2569 | 2569 |
| 2570 | 2570 |
| 2571 static bool CheckConstructor(i::Isolate* isolate, | 2571 static bool CheckConstructor(i::Isolate* isolate, |
| 2572 i::Handle<i::JSObject> obj, | 2572 i::Handle<i::JSObject> obj, |
| 2573 const char* class_name) { | 2573 const char* class_name) { |
| 2574 i::Handle<i::Object> constr(obj->map()->constructor(), isolate); | 2574 i::Handle<i::Object> constr(obj->map()->GetConstructor(), isolate); |
| 2575 if (!constr->IsJSFunction()) return false; | 2575 if (!constr->IsJSFunction()) return false; |
| 2576 i::Handle<i::JSFunction> func = i::Handle<i::JSFunction>::cast(constr); | 2576 i::Handle<i::JSFunction> func = i::Handle<i::JSFunction>::cast(constr); |
| 2577 return func->shared()->native() && constr.is_identical_to( | 2577 return func->shared()->native() && constr.is_identical_to( |
| 2578 i::Object::GetProperty(isolate, | 2578 i::Object::GetProperty(isolate, |
| 2579 isolate->js_builtins_object(), | 2579 isolate->js_builtins_object(), |
| 2580 class_name).ToHandleChecked()); | 2580 class_name).ToHandleChecked()); |
| 2581 } | 2581 } |
| 2582 | 2582 |
| 2583 | 2583 |
| 2584 bool Value::IsNativeError() const { | 2584 bool Value::IsNativeError() const { |
| (...skipping 5190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7775 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7775 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7776 Address callback_address = | 7776 Address callback_address = |
| 7777 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7777 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7778 VMState<EXTERNAL> state(isolate); | 7778 VMState<EXTERNAL> state(isolate); |
| 7779 ExternalCallbackScope call_scope(isolate, callback_address); | 7779 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7780 callback(info); | 7780 callback(info); |
| 7781 } | 7781 } |
| 7782 | 7782 |
| 7783 | 7783 |
| 7784 } } // namespace v8::internal | 7784 } } // namespace v8::internal |
| OLD | NEW |