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

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

Issue 1743763004: Use v8::MicrotasksScope internally in V8RecursionScope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8rs-2-endofscope
Patch Set: v8_helpers 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
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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 return false; 314 return false;
315 } 315 }
316 316
317 static void initializeV8Common(v8::Isolate* isolate) 317 static void initializeV8Common(v8::Isolate* isolate)
318 { 318 {
319 isolate->AddGCPrologueCallback(V8GCController::gcPrologue); 319 isolate->AddGCPrologueCallback(V8GCController::gcPrologue);
320 isolate->AddGCEpilogueCallback(V8GCController::gcEpilogue); 320 isolate->AddGCEpilogueCallback(V8GCController::gcEpilogue);
321 321
322 v8::Debug::SetLiveEditEnabled(isolate, false); 322 v8::Debug::SetLiveEditEnabled(isolate, false);
323 323
324 isolate->SetAutorunMicrotasks(false); 324 isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped);
325 } 325 }
326 326
327 namespace { 327 namespace {
328 328
329 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { 329 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
330 // Allocate() methods return null to signal allocation failure to V8, which should respond by throwing 330 // Allocate() methods return null to signal allocation failure to V8, which should respond by throwing
331 // a RangeError, per http://www.ecma-international.org/ecma-262/6.0/#sec-cre atebytedatablock. 331 // a RangeError, per http://www.ecma-international.org/ecma-262/6.0/#sec-cre atebytedatablock.
332 void* Allocate(size_t size) override 332 void* Allocate(size_t size) override
333 { 333 {
334 void* data; 334 void* data;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 isolate->AddMessageListener(messageHandlerInWorker); 447 isolate->AddMessageListener(messageHandlerInWorker);
448 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 448 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
449 449
450 uint32_t here; 450 uint32_t here;
451 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); 451 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*)));
452 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 452 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
453 } 453 }
454 454
455 } // namespace blink 455 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698