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

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

Issue 2625093002: [wrapper-tracing] Add heap snapshot generator infrastructure (Closed)
Patch Set: Fix leftover Created 3 years, 11 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
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 isolate->SetAllowCodeGenerationFromStringsCallback( 410 isolate->SetAllowCodeGenerationFromStringsCallback(
411 codeGenerationCheckCallbackInMainThread); 411 codeGenerationCheckCallbackInMainThread);
412 412
413 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) { 413 if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) {
414 V8PerIsolateData::enableIdleTasks( 414 V8PerIsolateData::enableIdleTasks(
415 isolate, WTF::makeUnique<V8IdleTaskRunner>(scheduler)); 415 isolate, WTF::makeUnique<V8IdleTaskRunner>(scheduler));
416 } 416 }
417 417
418 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread); 418 isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread);
419 419
420 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) 420 if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler()) {
421 profiler->SetWrapperClassInfoProvider( 421 profiler->SetWrapperClassInfoProvider(
422 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo); 422 WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo);
423 profiler->SetGetRetainerInfosCallback(&V8GCController::getRetainerInfos);
424 }
423 425
424 ASSERT(ThreadState::mainThreadState()); 426 ASSERT(ThreadState::mainThreadState());
425 ThreadState::mainThreadState()->addInterruptor( 427 ThreadState::mainThreadState()->addInterruptor(
426 WTF::makeUnique<V8IsolateInterruptor>(isolate)); 428 WTF::makeUnique<V8IsolateInterruptor>(isolate));
427 ThreadState::mainThreadState()->registerTraceDOMWrappers( 429 ThreadState::mainThreadState()->registerTraceDOMWrappers(
428 isolate, V8GCController::traceDOMWrappers, 430 isolate, V8GCController::traceDOMWrappers,
429 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque, 431 ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque,
430 ScriptWrappableVisitor::performCleanup); 432 ScriptWrappableVisitor::performCleanup);
431 433
432 V8PerIsolateData::from(isolate)->setThreadDebugger( 434 V8PerIsolateData::from(isolate)->setThreadDebugger(
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 v8::Isolate::kMessageLog); 518 v8::Isolate::kMessageLog);
517 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 519 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
518 520
519 uint32_t here; 521 uint32_t here;
520 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - 522 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) -
521 kWorkerMaxStackSize); 523 kWorkerMaxStackSize);
522 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 524 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
523 } 525 }
524 526
525 } // namespace blink 527 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698