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

Unified Diff: include/AdblockPlus/V8ValueHolder.h

Issue 29364548: Issue 4188 - Update libadblockplus-android to use the latest libadblockplus (Closed)
Patch Set: recompiled for libadblockplus git:70ac2462a5e6437b5b1f58455b2e0172c33cc432. Duplicated on gihtub: https://github.com/4ntoine/libadblockplus-binaries/commit/5b9c89920c72f0b980a268bc80b73705c29a034a Created Dec. 5, 2016, 11:20 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
Index: include/AdblockPlus/V8ValueHolder.h
diff --git a/include/AdblockPlus/V8ValueHolder.h b/include/AdblockPlus/V8ValueHolder.h
deleted file mode 100644
index 254f3652651ac714769d9e07bdbfb91faf34d4c6..0000000000000000000000000000000000000000
--- a/include/AdblockPlus/V8ValueHolder.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2015 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef ADBLOCK_PLUS_V8_VALUE_HOLDER_H
-#define ADBLOCK_PLUS_V8_VALUE_HOLDER_H
-
-#include <memory>
-
-namespace v8
-{
- class Isolate;
- template<class T> class Handle;
- template<class T> class Persistent;
-}
-
-namespace AdblockPlus
-{
- template<class T>
- class V8ValueHolder
- {
- public:
- typedef typename v8::Persistent<T> V8Persistent;
- V8ValueHolder()
- {
- reset();
- }
- V8ValueHolder(v8::Isolate* isolate, v8::Handle<T> value)
- {
- reset(isolate, value);
- }
- ~V8ValueHolder()
- {
- if (this->value.get())
- {
- this->value->Dispose(this->isolate);
- this->value.reset(0);
- }
- }
- void reset(v8::Isolate* isolate, v8::Handle<T> value)
- {
- reset(isolate, std::auto_ptr<V8Persistent>(new V8Persistent(isolate, value)));
- }
- void reset(v8::Isolate* isolate = 0, std::auto_ptr<V8Persistent> value = std::auto_ptr<V8Persistent>(new V8Persistent()))
- {
- if (this->value.get())
- {
- this->value->Dispose(this->isolate);
- this->value.reset(0);
- }
-
- if (!value->IsEmpty())
- {
- this->isolate = isolate;
- this->value = value;
- }
- }
-
- operator V8Persistent&() const
- {
- return *value;
- }
- private:
- v8::Isolate* isolate;
- std::auto_ptr<V8Persistent> value;
- };
-}
-
-#endif

Powered by Google App Engine
This is Rietveld