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

Unified Diff: src/allocation-tracker.cc

Issue 99193002: Remove all stuff marked as V8_DEPRECATED. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. 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
« no previous file with comments | « src/allocation-tracker.h ('k') | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/allocation-tracker.cc
diff --git a/src/allocation-tracker.cc b/src/allocation-tracker.cc
index 8044cef3c810b42e3bce9eb47fe1c25d3cc3d411..59ba6c99a67241345f02e84032326dec7ddea1da 100644
--- a/src/allocation-tracker.cc
+++ b/src/allocation-tracker.cc
@@ -246,16 +246,15 @@ AllocationTracker::UnresolvedLocation::UnresolvedLocation(
info_(info) {
script_ = Handle<Script>::cast(
script->GetIsolate()->global_handles()->Create(script));
- GlobalHandles::MakeWeak(
- reinterpret_cast<Object**>(script_.location()),
- this, &HandleWeakScript);
+ GlobalHandles::MakeWeak(reinterpret_cast<Object**>(script_.location()),
+ this,
+ &HandleWeakScript);
}
AllocationTracker::UnresolvedLocation::~UnresolvedLocation() {
if (!script_.is_null()) {
- script_->GetIsolate()->global_handles()->Destroy(
- reinterpret_cast<Object**>(script_.location()));
+ GlobalHandles::Destroy(reinterpret_cast<Object**>(script_.location()));
}
}
@@ -268,12 +267,11 @@ void AllocationTracker::UnresolvedLocation::Resolve() {
void AllocationTracker::UnresolvedLocation::HandleWeakScript(
- v8::Isolate* isolate,
- v8::Persistent<v8::Value>* obj,
- void* data) {
- UnresolvedLocation* location = reinterpret_cast<UnresolvedLocation*>(data);
- location->script_ = Handle<Script>::null();
- obj->Reset();
+ const v8::WeakCallbackData<v8::Value, void>& data) {
+ UnresolvedLocation* loc =
+ reinterpret_cast<UnresolvedLocation*>(data.GetParameter());
+ GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location()));
+ loc->script_ = Handle<Script>::null();
}
« no previous file with comments | « src/allocation-tracker.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698