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

Unified Diff: chrome/renderer/extensions/scoped_persistent.h

Issue 98543004: Remove usage of deprecated V8 APIs from c/r/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/scoped_persistent.h
diff --git a/chrome/renderer/extensions/scoped_persistent.h b/chrome/renderer/extensions/scoped_persistent.h
index f3048eb509dee0c887b96713ac1fc42d80de81ab..22cc52bbf28604b7bf2d386bb06548ce6dffa54d 100644
--- a/chrome/renderer/extensions/scoped_persistent.h
+++ b/chrome/renderer/extensions/scoped_persistent.h
@@ -34,10 +34,7 @@ class ScopedPersistent {
}
void reset() {
- if (handle_.IsEmpty())
- return;
- handle_.Dispose();
- handle_.Clear();
+ handle_.Reset();
}
bool IsEmpty() const {
@@ -56,10 +53,10 @@ class ScopedPersistent {
return v8::Local<T>::New(isolate, handle_);
}
- template<typename P>
- void MakeWeak(P* parameters,
- typename v8::WeakReferenceCallbacks<T, P>::Revivable callback) {
- handle_.MakeWeak(parameters, callback);
+ template <typename P>
+ void SetWeak(P* parameters,
+ typename v8::WeakCallbackData<T, P>::Callback callback) {
+ handle_.SetWeak(parameters, callback);
}
private:
« no previous file with comments | « chrome/renderer/extensions/runtime_custom_bindings.cc ('k') | chrome/renderer/extensions/send_request_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698