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

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

Issue 1491083002: Set V8 extras mode in gin::V8Initializer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 void V8Initializer::initializeMainThreadIfNeeded() 378 void V8Initializer::initializeMainThreadIfNeeded()
379 { 379 {
380 ASSERT(isMainThread()); 380 ASSERT(isMainThread());
381 381
382 static bool initialized = false; 382 static bool initialized = false;
383 if (initialized) 383 if (initialized)
384 return; 384 return;
385 initialized = true; 385 initialized = true;
386 386
387 DEFINE_STATIC_LOCAL(ArrayBufferAllocator, arrayBufferAllocator, ()); 387 DEFINE_STATIC_LOCAL(ArrayBufferAllocator, arrayBufferAllocator, ());
388 gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode, &arrayBuf ferAllocator); 388 auto v8ExtrasMode = RuntimeEnabledFeatures::experimentalV8ExtrasEnabled() ? gin::IsolateHolder::kStableAndExperimentalV8Extras : gin::IsolateHolder::kStable V8Extras;
389 gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode, v8ExtrasM ode, &arrayBufferAllocator);
389 390
390 v8::Isolate* isolate = V8PerIsolateData::initialize(); 391 v8::Isolate* isolate = V8PerIsolateData::initialize();
391 392
392 initializeV8Common(isolate); 393 initializeV8Common(isolate);
393 394
394 v8::V8::SetFatalErrorHandler(reportFatalErrorInMainThread); 395 v8::V8::SetFatalErrorHandler(reportFatalErrorInMainThread);
395 v8::V8::AddMessageListener(messageHandlerInMainThread); 396 v8::V8::AddMessageListener(messageHandlerInMainThread);
396 v8::V8::SetFailedAccessCheckCallbackFunction(failedAccessCheckCallbackInMain Thread); 397 v8::V8::SetFailedAccessCheckCallbackFunction(failedAccessCheckCallbackInMain Thread);
397 v8::V8::SetAllowCodeGenerationFromStringsCallback(codeGenerationCheckCallbac kInMainThread); 398 v8::V8::SetAllowCodeGenerationFromStringsCallback(codeGenerationCheckCallbac kInMainThread);
398 399
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 464
464 v8::V8::AddMessageListener(messageHandlerInWorker); 465 v8::V8::AddMessageListener(messageHandlerInWorker);
465 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); 466 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
466 467
467 uint32_t here; 468 uint32_t here;
468 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); 469 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*)));
469 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 470 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
470 } 471 }
471 472
472 } // namespace blink 473 } // namespace blink
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698