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

Side by Side Diff: src/api.cc

Issue 2490783004: [serializer] small fixes for blink snapshot. (Closed)
Patch Set: Created 4 years, 1 month 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') | no next file » | 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 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 } 1232 }
1233 } 1233 }
1234 return Local<FunctionTemplate>(); 1234 return Local<FunctionTemplate>();
1235 } 1235 }
1236 1236
1237 Local<FunctionTemplate> FunctionTemplate::NewWithFastHandler( 1237 Local<FunctionTemplate> FunctionTemplate::NewWithFastHandler(
1238 Isolate* isolate, FunctionCallback callback, 1238 Isolate* isolate, FunctionCallback callback,
1239 experimental::FastAccessorBuilder* fast_handler, v8::Local<Value> data, 1239 experimental::FastAccessorBuilder* fast_handler, v8::Local<Value> data,
1240 v8::Local<Signature> signature, int length) { 1240 v8::Local<Signature> signature, int length) {
1241 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 1241 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1242 DCHECK(!i_isolate->serializer_enabled());
1243 LOG_API(i_isolate, FunctionTemplate, NewWithFastHandler); 1242 LOG_API(i_isolate, FunctionTemplate, NewWithFastHandler);
1244 ENTER_V8(i_isolate); 1243 ENTER_V8(i_isolate);
1245 return FunctionTemplateNew(i_isolate, callback, fast_handler, data, signature, 1244 return FunctionTemplateNew(i_isolate, callback, fast_handler, data, signature,
1246 length, false); 1245 length, false);
1247 } 1246 }
1248 1247
1249 Local<FunctionTemplate> FunctionTemplate::NewWithCache( 1248 Local<FunctionTemplate> FunctionTemplate::NewWithCache(
1250 Isolate* isolate, FunctionCallback callback, Local<Private> cache_property, 1249 Isolate* isolate, FunctionCallback callback, Local<Private> cache_property,
1251 Local<Value> data, Local<Signature> signature, int length) { 1250 Local<Value> data, Local<Signature> signature, int length) {
1252 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 1251 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1253 DCHECK(!i_isolate->serializer_enabled());
vogelheim 2016/11/09 12:19:24 Ah. I'm rather certain this DCHECK is a copy of th
1254 LOG_API(i_isolate, FunctionTemplate, NewWithFastHandler); 1252 LOG_API(i_isolate, FunctionTemplate, NewWithFastHandler);
1255 ENTER_V8(i_isolate); 1253 ENTER_V8(i_isolate);
1256 return FunctionTemplateNew(i_isolate, callback, nullptr, data, signature, 1254 return FunctionTemplateNew(i_isolate, callback, nullptr, data, signature,
1257 length, false, cache_property); 1255 length, false, cache_property);
1258 } 1256 }
1259 1257
1260 Local<Signature> Signature::New(Isolate* isolate, 1258 Local<Signature> Signature::New(Isolate* isolate,
1261 Local<FunctionTemplate> receiver) { 1259 Local<FunctionTemplate> receiver) {
1262 return Utils::SignatureToLocal(Utils::OpenHandle(*receiver)); 1260 return Utils::SignatureToLocal(Utils::OpenHandle(*receiver));
1263 } 1261 }
(...skipping 8506 matching lines...) Expand 10 before | Expand all | Expand 10 after
9770 Address callback_address = 9768 Address callback_address =
9771 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9769 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9772 VMState<EXTERNAL> state(isolate); 9770 VMState<EXTERNAL> state(isolate);
9773 ExternalCallbackScope call_scope(isolate, callback_address); 9771 ExternalCallbackScope call_scope(isolate, callback_address);
9774 callback(info); 9772 callback(info);
9775 } 9773 }
9776 9774
9777 9775
9778 } // namespace internal 9776 } // namespace internal
9779 } // namespace v8 9777 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698