| OLD | NEW |
| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 if (ScriptForbiddenScope::isScriptForbidden()) { | 472 if (ScriptForbiddenScope::isScriptForbidden()) { |
| 473 throwScriptForbiddenException(isolate); | 473 throwScriptForbiddenException(isolate); |
| 474 return v8::Local<v8::Value>(); | 474 return v8::Local<v8::Value>(); |
| 475 } | 475 } |
| 476 V8RecursionScope recursionScope(isolate); | 476 V8RecursionScope recursionScope(isolate); |
| 477 v8::Local<v8::Value> result = function->Call(receiver, argc, args); | 477 v8::Local<v8::Value> result = function->Call(receiver, argc, args); |
| 478 crashIfV8IsDead(); | 478 crashIfV8IsDead(); |
| 479 return result; | 479 return result; |
| 480 } | 480 } |
| 481 | 481 |
| 482 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) | 482 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) |
| 483 { | 483 { |
| 484 TRACE_EVENT0("v8", "v8.callFunction"); | 484 TRACE_EVENT0("v8", "v8.callFunction"); |
| 485 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); | 485 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); |
| 486 V8RecursionScope::MicrotaskSuppression recursionScope(isolate); | 486 V8RecursionScope::MicrotaskSuppression recursionScope(isolate); |
| 487 v8::Local<v8::Value> result = function->Call(receiver, argc, args); | 487 v8::MaybeLocal<v8::Value> result = function->Call(receiver, argc, args); |
| 488 crashIfV8IsDead(); | 488 crashIfV8IsDead(); |
| 489 return result; | 489 return result; |
| 490 } | 490 } |
| 491 | 491 |
| 492 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Isolate* isolate, v8
::Local<v8::ObjectTemplate> objectTemplate) | 492 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Isolate* isolate, v8
::Local<v8::ObjectTemplate> objectTemplate) |
| 493 { | 493 { |
| 494 TRACE_EVENT0("v8", "v8.newInstance"); | 494 TRACE_EVENT0("v8", "v8.newInstance"); |
| 495 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); | 495 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); |
| 496 | 496 |
| 497 V8RecursionScope::MicrotaskSuppression scope(isolate); | 497 V8RecursionScope::MicrotaskSuppression scope(isolate); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 527 { | 527 { |
| 528 return cacheTag(CacheTagParser, cacheHandler); | 528 return cacheTag(CacheTagParser, cacheHandler); |
| 529 } | 529 } |
| 530 | 530 |
| 531 unsigned V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler) | 531 unsigned V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler) |
| 532 { | 532 { |
| 533 return cacheTag(CacheTagCode, cacheHandler); | 533 return cacheTag(CacheTagCode, cacheHandler); |
| 534 } | 534 } |
| 535 | 535 |
| 536 } // namespace blink | 536 } // namespace blink |
| OLD | NEW |