| Index: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
|
| index 68f47f322817a4a20bf0b42176e7b9f68f86d5da..5e6cece74313e6044239f1225ed40edc38c6a29a 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
|
| @@ -58,9 +58,11 @@
|
| #include "public/platform/WebScheduler.h"
|
| #include "public/platform/WebThread.h"
|
| #include "wtf/AddressSanitizer.h"
|
| +#include "wtf/PtrUtil.h"
|
| #include "wtf/RefPtr.h"
|
| #include "wtf/text/WTFString.h"
|
| #include "wtf/typed_arrays/ArrayBufferContents.h"
|
| +#include <memory>
|
| #include <v8-debug.h>
|
| #include <v8-profiler.h>
|
|
|
| @@ -123,7 +125,7 @@ static void messageHandlerInMainThread(v8::Local<v8::Message> message, v8::Local
|
| return;
|
|
|
| ExecutionContext* context = scriptState->getExecutionContext();
|
| - OwnPtr<SourceLocation> location = SourceLocation::fromMessage(isolate, message, context);
|
| + std::unique_ptr<SourceLocation> location = SourceLocation::fromMessage(isolate, message, context);
|
|
|
| AccessControlStatus accessControlStatus = NotSharableCrossOrigin;
|
| if (message->IsOpaque())
|
| @@ -202,7 +204,7 @@ static void promiseRejectHandler(v8::PromiseRejectMessage data, RejectedPromises
|
|
|
| String errorMessage;
|
| AccessControlStatus corsStatus = NotSharableCrossOrigin;
|
| - OwnPtr<SourceLocation> location;
|
| + std::unique_ptr<SourceLocation> location;
|
|
|
| v8::Local<v8::Message> message = v8::Exception::CreateMessage(isolate, exception);
|
| if (!message.IsEmpty()) {
|
| @@ -356,7 +358,7 @@ void V8Initializer::initializeMainThread()
|
|
|
| if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) {
|
| WebScheduler* scheduler = Platform::current()->currentThread()->scheduler();
|
| - V8PerIsolateData::enableIdleTasks(isolate, adoptPtr(new V8IdleTaskRunner(scheduler)));
|
| + V8PerIsolateData::enableIdleTasks(isolate, wrapUnique(new V8IdleTaskRunner(scheduler)));
|
| }
|
|
|
| isolate->SetPromiseRejectCallback(promiseRejectHandlerInMainThread);
|
| @@ -365,7 +367,7 @@ void V8Initializer::initializeMainThread()
|
| profiler->SetWrapperClassInfoProvider(WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo);
|
|
|
| ASSERT(ThreadState::mainThreadState());
|
| - ThreadState::mainThreadState()->addInterruptor(adoptPtr(new V8IsolateInterruptor(isolate)));
|
| + ThreadState::mainThreadState()->addInterruptor(wrapUnique(new V8IsolateInterruptor(isolate)));
|
| if (RuntimeEnabledFeatures::traceWrappablesEnabled()) {
|
| ThreadState::mainThreadState()->registerTraceDOMWrappers(isolate,
|
| V8GCController::traceDOMWrappers,
|
| @@ -376,7 +378,7 @@ void V8Initializer::initializeMainThread()
|
| nullptr);
|
| }
|
|
|
| - V8PerIsolateData::from(isolate)->setThreadDebugger(adoptPtr(new MainThreadDebugger(isolate)));
|
| + V8PerIsolateData::from(isolate)->setThreadDebugger(wrapUnique(new MainThreadDebugger(isolate)));
|
| }
|
|
|
| void V8Initializer::shutdownMainThread()
|
| @@ -411,7 +413,7 @@ static void messageHandlerInWorker(v8::Local<v8::Message> message, v8::Local<v8:
|
| perIsolateData->setReportingException(true);
|
|
|
| ExecutionContext* context = scriptState->getExecutionContext();
|
| - OwnPtr<SourceLocation> location = SourceLocation::fromMessage(isolate, message, context);
|
| + std::unique_ptr<SourceLocation> location = SourceLocation::fromMessage(isolate, message, context);
|
| ErrorEvent* event = ErrorEvent::create(toCoreStringWithNullCheck(message->Get()), std::move(location), &scriptState->world());
|
|
|
| AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
|
|
|