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

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

Issue 2638973002: Use loading tq instead of timer tq for per-isolate tasks (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 DEFINE_STATIC_LOCAL(ArrayBufferAllocator, arrayBufferAllocator, ()); 388 DEFINE_STATIC_LOCAL(ArrayBufferAllocator, arrayBufferAllocator, ());
389 auto v8ExtrasMode = RuntimeEnabledFeatures::experimentalV8ExtrasEnabled() 389 auto v8ExtrasMode = RuntimeEnabledFeatures::experimentalV8ExtrasEnabled()
390 ? gin::IsolateHolder::kStableAndExperimentalV8Extras 390 ? gin::IsolateHolder::kStableAndExperimentalV8Extras
391 : gin::IsolateHolder::kStableV8Extras; 391 : gin::IsolateHolder::kStableV8Extras;
392 gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode, 392 gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
393 v8ExtrasMode, &arrayBufferAllocator); 393 v8ExtrasMode, &arrayBufferAllocator);
394 394
395 // NOTE: Some threads (namely utility threads) don't have a scheduler. 395 // NOTE: Some threads (namely utility threads) don't have a scheduler.
396 WebScheduler* scheduler = Platform::current()->currentThread()->scheduler(); 396 WebScheduler* scheduler = Platform::current()->currentThread()->scheduler();
397 // TODO(altimin): Consider switching to timerTaskRunner here.
haraken 2017/01/18 00:05:03 Add a comment and mention that we use a loading tq
397 v8::Isolate* isolate = V8PerIsolateData::initialize( 398 v8::Isolate* isolate = V8PerIsolateData::initialize(
398 scheduler ? scheduler->timerTaskRunner() 399 scheduler ? scheduler->loadingTaskRunner()
haraken 2017/01/18 00:05:03 Maybe do we want to use an unthrottled task runner
altimin 2017/01/18 13:07:09 Most probably we need to expose different task run
399 : Platform::current()->currentThread()->getWebTaskRunner()); 400 : Platform::current()->currentThread()->getWebTaskRunner());
400 401
401 initializeV8Common(isolate); 402 initializeV8Common(isolate);
402 403
403 isolate->SetOOMErrorHandler(reportOOMErrorInMainThread); 404 isolate->SetOOMErrorHandler(reportOOMErrorInMainThread);
404 isolate->SetFatalErrorHandler(reportFatalErrorInMainThread); 405 isolate->SetFatalErrorHandler(reportFatalErrorInMainThread);
405 isolate->AddMessageListenerWithErrorLevel( 406 isolate->AddMessageListenerWithErrorLevel(
406 messageHandlerInMainThread, 407 messageHandlerInMainThread,
407 v8::Isolate::kMessageError | v8::Isolate::kMessageWarning | 408 v8::Isolate::kMessageError | v8::Isolate::kMessageWarning |
408 v8::Isolate::kMessageInfo | v8::Isolate::kMessageDebug | 409 v8::Isolate::kMessageInfo | v8::Isolate::kMessageDebug |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 v8::Isolate::kMessageLog); 519 v8::Isolate::kMessageLog);
519 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 520 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
520 521
521 uint32_t here; 522 uint32_t here;
522 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - 523 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) -
523 kWorkerMaxStackSize); 524 kWorkerMaxStackSize);
524 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 525 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
525 } 526 }
526 527
527 } // namespace blink 528 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698