| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 | 422 |
| 423 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); | 423 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); |
| 424 | 424 |
| 425 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) { | 425 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) { |
| 426 profiler->SetWrapperClassInfoProvider( | 426 profiler->SetWrapperClassInfoProvider( |
| 427 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo); | 427 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo); |
| 428 profiler->SetGetRetainerInfosCallback(&V8GCController::getRetainerInfos); | 428 profiler->SetGetRetainerInfosCallback(&V8GCController::getRetainerInfos); |
| 429 } | 429 } |
| 430 | 430 |
| 431 ASSERT(ThreadState::mainThreadState()); | 431 ASSERT(ThreadState::mainThreadState()); |
| 432 ThreadState::mainThreadState()->addInterruptor( | |
| 433 WTF::makeUnique<V8IsolateInterruptor>(isolate)); | |
| 434 ThreadState::mainThreadState()->registerTraceDOMWrappers( | 432 ThreadState::mainThreadState()->registerTraceDOMWrappers( |
| 435 isolate, V8GCController::traceDOMWrappers, | 433 isolate, V8GCController::traceDOMWrappers, |
| 436 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque, | 434 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque, |
| 437 ScriptWrappableVisitor::performCleanup); | 435 ScriptWrappableVisitor::performCleanup); |
| 438 | 436 |
| 439 V8PerIsolateData::from(isolate)->setThreadDebugger( | 437 V8PerIsolateData::from(isolate)->setThreadDebugger( |
| 440 WTF::makeUnique<MainThreadDebugger>(isolate)); | 438 WTF::makeUnique<MainThreadDebugger>(isolate)); |
| 441 } | 439 } |
| 442 | 440 |
| 443 static void reportFatalErrorInWorker(const char* location, | 441 static void reportFatalErrorInWorker(const char* location, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 v8::Isolate::kMessageLog); | 514 v8::Isolate::kMessageLog); |
| 517 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 515 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 518 | 516 |
| 519 uint32_t here; | 517 uint32_t here; |
| 520 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - | 518 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - |
| 521 kWorkerMaxStackSize); | 519 kWorkerMaxStackSize); |
| 522 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 520 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 523 } | 521 } |
| 524 | 522 |
| 525 } // namespace blink | 523 } // namespace blink |
| OLD | NEW |