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

Side by Side Diff: src/api.cc

Issue 1128553002: Add ObjectTemplate::New() taking FunctionTemplate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add ObjectTemplate::New() taking FunctionTemplate. Created 5 years, 7 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 | « include/v8.h ('k') | test/cctest/test-api.cc » ('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/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
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
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
OLDNEW
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698