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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 isolate->SetOOMErrorHandler(reportOOMErrorInMainThread); 397 isolate->SetOOMErrorHandler(reportOOMErrorInMainThread);
398 isolate->SetFatalErrorHandler(reportFatalErrorInMainThread); 398 isolate->SetFatalErrorHandler(reportFatalErrorInMainThread);
399 isolate->AddMessageListener(messageHandlerInMainThread); 399 isolate->AddMessageListener(messageHandlerInMainThread);
400 isolate->SetFailedAccessCheckCallbackFunction( 400 isolate->SetFailedAccessCheckCallbackFunction(
401 failedAccessCheckCallbackInMainThread); 401 failedAccessCheckCallbackInMainThread);
402 isolate->SetAllowCodeGenerationFromStringsCallback( 402 isolate->SetAllowCodeGenerationFromStringsCallback(
403 codeGenerationCheckCallbackInMainThread); 403 codeGenerationCheckCallbackInMainThread);
404 404
405 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) { 405 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) {
406 WebScheduler* scheduler = Platform::current()->currentThread()->scheduler(); 406 WebScheduler* scheduler = Platform::current()->currentThread()->scheduler();
407 V8PerIsolateData::enableIdleTasks(isolate, 407 V8PerIsolateData::enableIdleTasks(
408 makeUnique<V8IdleTaskRunner>(scheduler)); 408 isolate, WTF::makeUnique<V8IdleTaskRunner>(scheduler));
409 } 409 }
410 410
411 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); 411 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread);
412 412
413 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) 413 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler())
414 profiler->SetWrapperClassInfoProvider( 414 profiler->SetWrapperClassInfoProvider(
415 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo); 415 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo);
416 416
417 ASSERT(ThreadState::mainThreadState()); 417 ASSERT(ThreadState::mainThreadState());
418 ThreadState::mainThreadState()->addInterruptor( 418 ThreadState::mainThreadState()->addInterruptor(
419 makeUnique<V8IsolateInterruptor>(isolate)); 419 WTF::makeUnique<V8IsolateInterruptor>(isolate));
420 if (RuntimeEnabledFeatures::traceWrappablesEnabled()) { 420 if (RuntimeEnabledFeatures::traceWrappablesEnabled()) {
421 ThreadState::mainThreadState()->registerTraceDOMWrappers( 421 ThreadState::mainThreadState()->registerTraceDOMWrappers(
422 isolate, V8GCController::traceDOMWrappers, 422 isolate, V8GCController::traceDOMWrappers,
423 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque, 423 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque,
424 ScriptWrappableVisitor::performCleanup); 424 ScriptWrappableVisitor::performCleanup);
425 } else { 425 } else {
426 ThreadState::mainThreadState()->registerTraceDOMWrappers( 426 ThreadState::mainThreadState()->registerTraceDOMWrappers(
427 isolate, V8GCController::traceDOMWrappers, nullptr, nullptr); 427 isolate, V8GCController::traceDOMWrappers, nullptr, nullptr);
428 } 428 }
429 429
430 V8PerIsolateData::from(isolate)->setThreadDebugger( 430 V8PerIsolateData::from(isolate)->setThreadDebugger(
431 makeUnique<MainThreadDebugger>(isolate)); 431 WTF::makeUnique<MainThreadDebugger>(isolate));
432 } 432 }
433 433
434 void V8Initializer::shutdownMainThread() { 434 void V8Initializer::shutdownMainThread() {
435 ASSERT(isMainThread()); 435 ASSERT(isMainThread());
436 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); 436 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate();
437 V8PerIsolateData::willBeDestroyed(isolate); 437 V8PerIsolateData::willBeDestroyed(isolate);
438 V8PerIsolateData::destroy(isolate); 438 V8PerIsolateData::destroy(isolate);
439 } 439 }
440 440
441 static void reportFatalErrorInWorker(const char* location, 441 static void reportFatalErrorInWorker(const char* location,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 isolate->AddMessageListener(messageHandlerInWorker); 501 isolate->AddMessageListener(messageHandlerInWorker);
502 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 502 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
503 503
504 uint32_t here; 504 uint32_t here;
505 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - 505 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) -
506 kWorkerMaxStackSize); 506 kWorkerMaxStackSize);
507 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 507 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
508 } 508 }
509 509
510 } // namespace blink 510 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698