@@ -217,7 +217,10 @@ IsolateHStatistics IsolationGetHeapStatistics(IsolatePtr iso) {
217
217
hs.number_of_detached_contexts ()};
218
218
}
219
219
220
- RtnUnboundScript IsolateCompileUnboundScript (IsolatePtr iso, const char * s, const char * o, CompileOptions opts) {
220
+ RtnUnboundScript IsolateCompileUnboundScript (IsolatePtr iso,
221
+ const char * s,
222
+ const char * o,
223
+ CompileOptions opts) {
221
224
ISOLATE_SCOPE_INTERNAL_CONTEXT (iso);
222
225
TryCatch try_catch (iso);
223
226
Local<Context> local_ctx = ctx->ptr .Get (iso);
@@ -230,20 +233,23 @@ RtnUnboundScript IsolateCompileUnboundScript(IsolatePtr iso, const char* s, cons
230
233
Local<String> ogn =
231
234
String::NewFromUtf8 (iso, o, NewStringType::kNormal ).ToLocalChecked ();
232
235
233
- ScriptCompiler::CompileOptions option = static_cast <ScriptCompiler::CompileOptions>(opts.compileOption );
236
+ ScriptCompiler::CompileOptions option =
237
+ static_cast <ScriptCompiler::CompileOptions>(opts.compileOption );
234
238
235
239
ScriptCompiler::CachedData* cached_data = nullptr ;
236
240
237
241
if (opts.cachedData .data ) {
238
- cached_data = new ScriptCompiler::CachedData (opts.cachedData .data , opts.cachedData .length );
242
+ cached_data = new ScriptCompiler::CachedData (opts.cachedData .data ,
243
+ opts.cachedData .length );
239
244
}
240
245
241
246
ScriptOrigin script_origin (ogn);
242
247
243
248
ScriptCompiler::Source source (src, script_origin, cached_data);
244
249
245
250
Local<UnboundScript> unbound_script;
246
- if (!ScriptCompiler::CompileUnboundScript (iso, &source, option).ToLocal (&unbound_script)) {
251
+ if (!ScriptCompiler::CompileUnboundScript (iso, &source, option)
252
+ .ToLocal (&unbound_script)) {
247
253
rtn.error = ExceptionError (try_catch, iso, local_ctx);
248
254
return rtn;
249
255
};
@@ -269,8 +275,8 @@ ValuePtr IsolateThrowException(IsolatePtr iso, ValuePtr value) {
269
275
m_value* new_val = new m_value;
270
276
new_val->iso = iso;
271
277
new_val->ctx = ctx;
272
- new_val->ptr = Persistent<Value, CopyablePersistentTraits<Value>>(
273
- iso, throw_ret_val);
278
+ new_val->ptr =
279
+ Persistent<Value, CopyablePersistentTraits<Value>>( iso, throw_ret_val);
274
280
275
281
return tracked_value (ctx, new_val);
276
282
}
@@ -454,8 +460,7 @@ RtnValue ObjectTemplateNewInstance(TemplatePtr ptr, ContextPtr ctx) {
454
460
return rtn;
455
461
}
456
462
457
- void ObjectTemplateSetInternalFieldCount (TemplatePtr ptr,
458
- int field_count) {
463
+ void ObjectTemplateSetInternalFieldCount (TemplatePtr ptr, int field_count) {
459
464
LOCAL_TEMPLATE (ptr);
460
465
461
466
Local<ObjectTemplate> obj_tmpl = tmpl.As <ObjectTemplate>();
@@ -647,12 +652,15 @@ RtnValue RunScript(ContextPtr ctx, const char* source, const char* origin) {
647
652
648
653
/* ********* UnboundScript & ScriptCompilerCachedData **********/
649
654
650
- ScriptCompilerCachedData* UnboundScriptCreateCodeCache (IsolatePtr iso, UnboundScriptPtr us_ptr) {
655
+ ScriptCompilerCachedData* UnboundScriptCreateCodeCache (
656
+ IsolatePtr iso,
657
+ UnboundScriptPtr us_ptr) {
651
658
ISOLATE_SCOPE (iso);
652
659
653
660
Local<UnboundScript> unbound_script = us_ptr->ptr .Get (iso);
654
661
655
- ScriptCompiler::CachedData* cached_data = ScriptCompiler::CreateCodeCache (unbound_script);
662
+ ScriptCompiler::CachedData* cached_data =
663
+ ScriptCompiler::CreateCodeCache (unbound_script);
656
664
657
665
ScriptCompilerCachedData* cd = new ScriptCompilerCachedData;
658
666
cd->ptr = cached_data;
0 commit comments