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

Side by Side Diff: Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 1036803002: binidngs: Make callInternalFunction return MaybeLocal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 if (ScriptForbiddenScope::isScriptForbidden()) { 474 if (ScriptForbiddenScope::isScriptForbidden()) {
475 throwScriptForbiddenException(isolate); 475 throwScriptForbiddenException(isolate);
476 return v8::Local<v8::Value>(); 476 return v8::Local<v8::Value>();
477 } 477 }
478 V8RecursionScope recursionScope(isolate); 478 V8RecursionScope recursionScope(isolate);
479 v8::Local<v8::Value> result = function->Call(receiver, argc, args); 479 v8::Local<v8::Value> result = function->Call(receiver, argc, args);
480 crashIfV8IsDead(); 480 crashIfV8IsDead();
481 return result; 481 return result;
482 } 482 }
483 483
484 v8::Local<v8::Value> V8ScriptRunner::callInternalFunction(v8::Local<v8::Function > function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> args[] , v8::Isolate* isolate) 484 v8::MaybeLocal<v8::Value> V8ScriptRunner::callInternalFunction(v8::Local<v8::Fun ction> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> a rgs[], v8::Isolate* isolate)
485 { 485 {
486 TRACE_EVENT0("v8", "v8.callFunction"); 486 TRACE_EVENT0("v8", "v8.callFunction");
487 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); 487 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
488 V8RecursionScope::MicrotaskSuppression recursionScope(isolate); 488 V8RecursionScope::MicrotaskSuppression recursionScope(isolate);
489 v8::Local<v8::Value> result = function->Call(receiver, argc, args); 489 v8::MaybeLocal<v8::Value> result = function->Call(receiver, argc, args);
490 crashIfV8IsDead(); 490 crashIfV8IsDead();
491 return result; 491 return result;
492 } 492 }
493 493
494 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Isolate* isolate, v8 ::Local<v8::ObjectTemplate> objectTemplate) 494 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Isolate* isolate, v8 ::Local<v8::ObjectTemplate> objectTemplate)
495 { 495 {
496 TRACE_EVENT0("v8", "v8.newInstance"); 496 TRACE_EVENT0("v8", "v8.newInstance");
497 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); 497 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
498 498
499 V8RecursionScope::MicrotaskSuppression scope(isolate); 499 V8RecursionScope::MicrotaskSuppression scope(isolate);
(...skipping 29 matching lines...) Expand all
529 { 529 {
530 return cacheTag(CacheTagParser, cacheHandler); 530 return cacheTag(CacheTagParser, cacheHandler);
531 } 531 }
532 532
533 unsigned V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler) 533 unsigned V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler)
534 { 534 {
535 return cacheTag(CacheTagCode, cacheHandler); 535 return cacheTag(CacheTagCode, cacheHandler);
536 } 536 }
537 537
538 } // namespace blink 538 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698