OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |