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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 1779733002: Move code to register Oilpan's interruptor to V8Initializer::initialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebKit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) { 371 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) {
372 WebScheduler* scheduler = Platform::current()->currentThread()->schedule r(); 372 WebScheduler* scheduler = Platform::current()->currentThread()->schedule r();
373 V8PerIsolateData::enableIdleTasks(isolate, adoptPtr(new V8IdleTaskRunner (scheduler))); 373 V8PerIsolateData::enableIdleTasks(isolate, adoptPtr(new V8IdleTaskRunner (scheduler)));
374 } 374 }
375 375
376 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); 376 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread);
377 377
378 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) 378 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler())
379 profiler->SetWrapperClassInfoProvider(WrapperTypeInfo::NodeClassId, &Ret ainedDOMInfo::createRetainedDOMInfo); 379 profiler->SetWrapperClassInfoProvider(WrapperTypeInfo::NodeClassId, &Ret ainedDOMInfo::createRetainedDOMInfo);
380
381 ASSERT(ThreadState::current());
382 ThreadState::current()->addInterruptor(adoptPtr(new V8IsolateInterruptor(iso late)));
383 ThreadState::current()->registerTraceDOMWrappers(isolate, V8GCController::tr aceDOMWrappers);
380 } 384 }
381 385
382 void V8Initializer::shutdownMainThread() 386 void V8Initializer::shutdownMainThread()
383 { 387 {
384 ASSERT(isMainThread()); 388 ASSERT(isMainThread());
389 ThreadState::current()->unregisterTraceDOMWrappers();
385 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); 390 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate();
386 V8PerIsolateData::willBeDestroyed(isolate); 391 V8PerIsolateData::willBeDestroyed(isolate);
387 V8PerIsolateData::destroy(isolate); 392 V8PerIsolateData::destroy(isolate);
388 } 393 }
389 394
390 static void reportFatalErrorInWorker(const char* location, const char* message) 395 static void reportFatalErrorInWorker(const char* location, const char* message)
391 { 396 {
392 // FIXME: We temporarily deal with V8 internal error situations such as out- of-memory by crashing the worker. 397 // FIXME: We temporarily deal with V8 internal error situations such as out- of-memory by crashing the worker.
393 CRASH(); 398 CRASH();
394 } 399 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 447
443 isolate->AddMessageListener(messageHandlerInWorker); 448 isolate->AddMessageListener(messageHandlerInWorker);
444 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 449 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
445 450
446 uint32_t here; 451 uint32_t here;
447 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); 452 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*)));
448 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 453 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
449 } 454 }
450 455
451 } // namespace blink 456 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebKit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698