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 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 EnsureNotInstantiated(info, "v8::FunctionTemplate::RemovePrototype"); | 1191 EnsureNotInstantiated(info, "v8::FunctionTemplate::RemovePrototype"); |
1192 auto isolate = info->GetIsolate(); | 1192 auto isolate = info->GetIsolate(); |
1193 ENTER_V8(isolate); | 1193 ENTER_V8(isolate); |
1194 info->set_remove_prototype(true); | 1194 info->set_remove_prototype(true); |
1195 } | 1195 } |
1196 | 1196 |
1197 | 1197 |
1198 // --- O b j e c t T e m p l a t e --- | 1198 // --- O b j e c t T e m p l a t e --- |
1199 | 1199 |
1200 | 1200 |
1201 Local<ObjectTemplate> ObjectTemplate::New(Isolate* isolate) { | 1201 Local<ObjectTemplate> ObjectTemplate::New( |
1202 return New(reinterpret_cast<i::Isolate*>(isolate), Local<FunctionTemplate>()); | 1202 Isolate* isolate, v8::Handle<FunctionTemplate> constructor) { |
| 1203 return New(reinterpret_cast<i::Isolate*>(isolate), constructor); |
1203 } | 1204 } |
1204 | 1205 |
1205 | 1206 |
1206 Local<ObjectTemplate> ObjectTemplate::New() { | 1207 Local<ObjectTemplate> ObjectTemplate::New() { |
1207 return New(i::Isolate::Current(), Local<FunctionTemplate>()); | 1208 return New(i::Isolate::Current(), Local<FunctionTemplate>()); |
1208 } | 1209 } |
1209 | 1210 |
1210 | 1211 |
1211 Local<ObjectTemplate> ObjectTemplate::New( | 1212 Local<ObjectTemplate> ObjectTemplate::New( |
1212 i::Isolate* isolate, | 1213 i::Isolate* isolate, |
(...skipping 6818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8031 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8032 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8032 Address callback_address = | 8033 Address callback_address = |
8033 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8034 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8034 VMState<EXTERNAL> state(isolate); | 8035 VMState<EXTERNAL> state(isolate); |
8035 ExternalCallbackScope call_scope(isolate, callback_address); | 8036 ExternalCallbackScope call_scope(isolate, callback_address); |
8036 callback(info); | 8037 callback(info); |
8037 } | 8038 } |
8038 | 8039 |
8039 | 8040 |
8040 } } // namespace v8::internal | 8041 } } // namespace v8::internal |
OLD | NEW |