mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 187216.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1136 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -102,6 +102,7 @@ class CefV8HandleBase :
|
||||
|
||||
bool BelongsToCurrentThread() const;
|
||||
|
||||
v8::Isolate* isolate() const { return isolate_; }
|
||||
scoped_refptr<base::SequencedTaskRunner> task_runner() const {
|
||||
return task_runner_;
|
||||
}
|
||||
@ -112,6 +113,7 @@ class CefV8HandleBase :
|
||||
explicit CefV8HandleBase(v8::Handle<v8::Context> context);
|
||||
|
||||
protected:
|
||||
v8::Isolate* isolate_;
|
||||
scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
||||
scoped_refptr<CefV8ContextState> context_state_;
|
||||
};
|
||||
@ -126,10 +128,10 @@ class CefV8Handle : public CefV8HandleBase {
|
||||
|
||||
CefV8Handle(v8::Handle<v8::Context> context, handleType v)
|
||||
: CefV8HandleBase(context),
|
||||
handle_(persistentType::New(v)) {
|
||||
handle_(persistentType::New(isolate(), v)) {
|
||||
}
|
||||
virtual ~CefV8Handle() {
|
||||
handle_.Dispose();
|
||||
handle_.Dispose(isolate());
|
||||
handle_.Clear();
|
||||
}
|
||||
|
||||
@ -258,16 +260,16 @@ class CefV8ValueImpl : public CefV8Value {
|
||||
|
||||
Handle(v8::Handle<v8::Context> context, handleType v, CefTrackNode* tracker)
|
||||
: CefV8HandleBase(context),
|
||||
handle_(persistentType::New(v)),
|
||||
handle_(persistentType::New(isolate(), v)),
|
||||
tracker_(tracker),
|
||||
tracker_should_persist_(false) {
|
||||
should_persist_(false) {
|
||||
}
|
||||
virtual ~Handle();
|
||||
|
||||
handleType GetHandle(bool should_persist) {
|
||||
DCHECK(IsValid());
|
||||
if (should_persist && tracker_ && !tracker_should_persist_)
|
||||
tracker_should_persist_ = true;
|
||||
if (should_persist && !should_persist_)
|
||||
should_persist_ = true;
|
||||
return handle_;
|
||||
}
|
||||
|
||||
@ -278,9 +280,8 @@ class CefV8ValueImpl : public CefV8Value {
|
||||
// internal data or function handler objects that are reference counted.
|
||||
CefTrackNode* tracker_;
|
||||
|
||||
// True if the |tracker_| object needs to persist due to an Object or
|
||||
// Function type being passed into V8.
|
||||
bool tracker_should_persist_;
|
||||
// True if the handle needs to persist due to it being passed into V8.
|
||||
bool should_persist_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Handle);
|
||||
};
|
||||
|
Reference in New Issue
Block a user