Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/JsEngine.cpp

Issue 5163715573841920: Issue 768 - Switch from TR1 to C++11 (Closed)
Patch Set: fix including of <memory> Created Aug. 7, 2015, 6:07 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/FilterEngine.cpp ('k') | test/BaseJsTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsEngine.cpp
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp
index b5627fbcb7fc5d676e43582c40025da321445f6e..4b11b5f6844a0ea2ecff506a5a0401e19712d41c 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -157,8 +157,8 @@ AdblockPlus::JsValuePtr AdblockPlus::JsEngine::NewCallback(
// Note: we are leaking this weak pointer, no obvious way to destroy it when
// it's no longer used
- std::tr1::weak_ptr<JsEngine>* data =
- new std::tr1::weak_ptr<JsEngine>(shared_from_this());
+ std::weak_ptr<JsEngine>* data =
+ new std::weak_ptr<JsEngine>(shared_from_this());
v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(callback,
v8::External::New(data));
return JsValuePtr(new JsValue(shared_from_this(), templ->GetFunction()));
@@ -168,8 +168,8 @@ AdblockPlus::JsEnginePtr AdblockPlus::JsEngine::FromArguments(const v8::Argument
{
const v8::Local<const v8::External> external =
v8::Local<const v8::External>::Cast(arguments.Data());
- std::tr1::weak_ptr<JsEngine>* data =
- static_cast<std::tr1::weak_ptr<JsEngine>*>(external->Value());
+ std::weak_ptr<JsEngine>* data =
+ static_cast<std::weak_ptr<JsEngine>*>(external->Value());
JsEnginePtr result = data->lock();
if (!result)
throw std::runtime_error("Oops, our JsEngine is gone, how did that happen?");
« no previous file with comments | « src/FilterEngine.cpp ('k') | test/BaseJsTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld