| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 isolate->SetAllowCodeGenerationFromStringsCallback( | 414 isolate->SetAllowCodeGenerationFromStringsCallback( |
| 415 codeGenerationCheckCallbackInMainThread); | 415 codeGenerationCheckCallbackInMainThread); |
| 416 | 416 |
| 417 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) { | 417 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) { |
| 418 V8PerIsolateData::enableIdleTasks( | 418 V8PerIsolateData::enableIdleTasks( |
| 419 isolate, WTF::makeUnique<V8IdleTaskRunner>(scheduler)); | 419 isolate, WTF::makeUnique<V8IdleTaskRunner>(scheduler)); |
| 420 } | 420 } |
| 421 | 421 |
| 422 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); | 422 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); |
| 423 | 423 |
| 424 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) | 424 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) { |
| 425 profiler->SetWrapperClassInfoProvider( | 425 profiler->SetWrapperClassInfoProvider( |
| 426 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo); | 426 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo); |
| 427 profiler->SetGetRetainerInfosCallback(&V8GCController::getRetainerInfos); |
| 428 } |
| 427 | 429 |
| 428 ASSERT(ThreadState::mainThreadState()); | 430 ASSERT(ThreadState::mainThreadState()); |
| 429 ThreadState::mainThreadState()->addInterruptor( | 431 ThreadState::mainThreadState()->addInterruptor( |
| 430 WTF::makeUnique<V8IsolateInterruptor>(isolate)); | 432 WTF::makeUnique<V8IsolateInterruptor>(isolate)); |
| 431 ThreadState::mainThreadState()->registerTraceDOMWrappers( | 433 ThreadState::mainThreadState()->registerTraceDOMWrappers( |
| 432 isolate, V8GCController::traceDOMWrappers, | 434 isolate, V8GCController::traceDOMWrappers, |
| 433 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque, | 435 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque, |
| 434 ScriptWrappableVisitor::performCleanup); | 436 ScriptWrappableVisitor::performCleanup); |
| 435 | 437 |
| 436 V8PerIsolateData::from(isolate)->setThreadDebugger( | 438 V8PerIsolateData::from(isolate)->setThreadDebugger( |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 v8::Isolate::kMessageLog); | 522 v8::Isolate::kMessageLog); |
| 521 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 523 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 522 | 524 |
| 523 uint32_t here; | 525 uint32_t here; |
| 524 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - | 526 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - |
| 525 kWorkerMaxStackSize); | 527 kWorkerMaxStackSize); |
| 526 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 528 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 527 } | 529 } |
| 528 | 530 |
| 529 } // namespace blink | 531 } // namespace blink |
| OLD | NEW |