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

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

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 28 matching lines...) Expand all
39 #include "wtf/StringExtras.h" 39 #include "wtf/StringExtras.h"
40 #include <memory> 40 #include <memory>
41 #include <stdlib.h> 41 #include <stdlib.h>
42 42
43 namespace blink { 43 namespace blink {
44 44
45 V8PerContextData::V8PerContextData(v8::Local<v8::Context> context) 45 V8PerContextData::V8PerContextData(v8::Local<v8::Context> context)
46 : m_isolate(context->GetIsolate()), 46 : m_isolate(context->GetIsolate()),
47 m_wrapperBoilerplates(m_isolate), 47 m_wrapperBoilerplates(m_isolate),
48 m_constructorMap(m_isolate), 48 m_constructorMap(m_isolate),
49 m_contextHolder(wrapUnique(new gin::ContextHolder(m_isolate))), 49 m_contextHolder(makeUnique<gin::ContextHolder>(m_isolate)),
50 m_context(m_isolate, context), 50 m_context(m_isolate, context),
51 m_activityLogger(0), 51 m_activityLogger(0),
52 m_compiledPrivateScript(m_isolate) { 52 m_compiledPrivateScript(m_isolate) {
53 m_contextHolder->SetContext(context); 53 m_contextHolder->SetContext(context);
54 54
55 v8::Context::Scope contextScope(context); 55 v8::Context::Scope contextScope(context);
56 ASSERT(m_errorPrototype.isEmpty()); 56 ASSERT(m_errorPrototype.isEmpty());
57 v8::Local<v8::Value> objectValue = 57 v8::Local<v8::Value> objectValue =
58 context->Global() 58 context->Global()
59 ->Get(context, v8AtomicString(m_isolate, "Error")) 59 ->Get(context, v8AtomicString(m_isolate, "Error"))
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return m_compiledPrivateScript.Get(className); 179 return m_compiledPrivateScript.Get(className);
180 } 180 }
181 181
182 void V8PerContextData::setCompiledPrivateScript( 182 void V8PerContextData::setCompiledPrivateScript(
183 String className, 183 String className,
184 v8::Local<v8::Value> compiledObject) { 184 v8::Local<v8::Value> compiledObject) {
185 m_compiledPrivateScript.Set(className, compiledObject); 185 m_compiledPrivateScript.Set(className, compiledObject);
186 } 186 }
187 187
188 } // namespace blink 188 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698