| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 return policy->allowEval(ScriptState::from(context), ContentSecurity
Policy::SendReport, ContentSecurityPolicy::WillThrowException); | 283 return policy->allowEval(ScriptState::from(context), ContentSecurity
Policy::SendReport, ContentSecurityPolicy::WillThrowException); |
| 284 } | 284 } |
| 285 return false; | 285 return false; |
| 286 } | 286 } |
| 287 | 287 |
| 288 static void initializeV8Common(v8::Isolate* isolate) | 288 static void initializeV8Common(v8::Isolate* isolate) |
| 289 { | 289 { |
| 290 isolate->AddGCPrologueCallback(V8GCController::gcPrologue); | 290 isolate->AddGCPrologueCallback(V8GCController::gcPrologue); |
| 291 isolate->AddGCEpilogueCallback(V8GCController::gcEpilogue); | 291 isolate->AddGCEpilogueCallback(V8GCController::gcEpilogue); |
| 292 if (RuntimeEnabledFeatures::traceWrappablesEnabled()) { | 292 if (RuntimeEnabledFeatures::traceWrappablesEnabled()) { |
| 293 ScriptWrappableVisitor* visitor = new ScriptWrappableVisitor(isolate); | 293 std::unique_ptr<ScriptWrappableVisitor> visitor(new ScriptWrappableVisit
or(isolate)); |
| 294 isolate->SetEmbedderHeapTracer(visitor); | 294 isolate->SetEmbedderHeapTracer(visitor.get()); |
| 295 V8PerIsolateData::from(isolate)->setScriptWrappableVisitor(std::move(vis
itor)); |
| 295 } | 296 } |
| 296 | 297 |
| 297 v8::Debug::SetLiveEditEnabled(isolate, false); | 298 v8::Debug::SetLiveEditEnabled(isolate, false); |
| 298 | 299 |
| 299 isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped); | 300 isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped); |
| 300 } | 301 } |
| 301 | 302 |
| 302 namespace { | 303 namespace { |
| 303 | 304 |
| 304 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 305 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 427 |
| 427 isolate->AddMessageListener(messageHandlerInWorker); | 428 isolate->AddMessageListener(messageHandlerInWorker); |
| 428 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 429 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 429 | 430 |
| 430 uint32_t here; | 431 uint32_t here; |
| 431 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); | 432 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); |
| 432 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 433 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 433 } | 434 } |
| 434 | 435 |
| 435 } // namespace blink | 436 } // namespace blink |
| OLD | NEW |