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 346 matching lines...) Loading... |
357 } | 357 } |
358 | 358 |
359 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); | 359 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); |
360 | 360 |
361 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) | 361 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) |
362 profiler->SetWrapperClassInfoProvider(WrapperTypeInfo::NodeClassId, &Ret
ainedDOMInfo::createRetainedDOMInfo); | 362 profiler->SetWrapperClassInfoProvider(WrapperTypeInfo::NodeClassId, &Ret
ainedDOMInfo::createRetainedDOMInfo); |
363 | 363 |
364 ASSERT(ThreadState::mainThreadState()); | 364 ASSERT(ThreadState::mainThreadState()); |
365 ThreadState::mainThreadState()->addInterruptor(adoptPtr(new V8IsolateInterru
ptor(isolate))); | 365 ThreadState::mainThreadState()->addInterruptor(adoptPtr(new V8IsolateInterru
ptor(isolate))); |
366 ThreadState::mainThreadState()->registerTraceDOMWrappers(isolate, V8GCContro
ller::traceDOMWrappers); | 366 ThreadState::mainThreadState()->registerTraceDOMWrappers(isolate, V8GCContro
ller::traceDOMWrappers); |
| 367 ThreadState::mainThreadState()->registerTraceWrappersMarkingDequeTracing( |
| 368 isolate, ScriptWrappableVisitor::traceWrappersMarkingDequeTracing); |
367 | 369 |
368 V8PerIsolateData::from(isolate)->setThreadDebugger(adoptPtr(new MainThreadDe
bugger(isolate))); | 370 V8PerIsolateData::from(isolate)->setThreadDebugger(adoptPtr(new MainThreadDe
bugger(isolate))); |
369 } | 371 } |
370 | 372 |
371 void V8Initializer::shutdownMainThread() | 373 void V8Initializer::shutdownMainThread() |
372 { | 374 { |
373 ASSERT(isMainThread()); | 375 ASSERT(isMainThread()); |
374 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); | 376 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); |
375 V8PerIsolateData::willBeDestroyed(isolate); | 377 V8PerIsolateData::willBeDestroyed(isolate); |
376 V8PerIsolateData::destroy(isolate); | 378 V8PerIsolateData::destroy(isolate); |
(...skipping 50 matching lines...) Loading... |
427 | 429 |
428 isolate->AddMessageListener(messageHandlerInWorker); | 430 isolate->AddMessageListener(messageHandlerInWorker); |
429 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 431 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
430 | 432 |
431 uint32_t here; | 433 uint32_t here; |
432 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); | 434 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); |
433 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 435 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
434 } | 436 } |
435 | 437 |
436 } // namespace blink | 438 } // namespace blink |
OLD | NEW |