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

Unified Diff: src/api.cc

Issue 1950963002: Introduce a new phantom weakness type without finalization callback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comment Created 4 years, 7 months 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 | « include/v8.h ('k') | src/global-handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 37c8c580fc50acbb1ecf895c9ed07a4c2a90b443..f77061659420e2d97f36d04683d9d9c0842a731e 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -683,8 +683,7 @@ void V8::RegisterExternallyReferencedObject(i::Object** object,
isolate->heap()->RegisterExternallyReferencedObject(object);
}
-
-void V8::MakeWeak(i::Object** object, void* parameter,
+void V8::MakeWeak(i::Object** location, void* parameter,
int internal_field_index1, int internal_field_index2,
WeakCallbackInfo<void>::Callback weak_callback) {
WeakCallbackType type = WeakCallbackType::kParameter;
@@ -699,24 +698,25 @@ void V8::MakeWeak(i::Object** object, void* parameter,
DCHECK_EQ(internal_field_index1, -1);
DCHECK_EQ(internal_field_index2, -1);
}
- i::GlobalHandles::MakeWeak(object, parameter, weak_callback, type);
+ i::GlobalHandles::MakeWeak(location, parameter, weak_callback, type);
}
-
-void V8::MakeWeak(i::Object** object, void* parameter,
+void V8::MakeWeak(i::Object** location, void* parameter,
WeakCallbackInfo<void>::Callback weak_callback,
WeakCallbackType type) {
- i::GlobalHandles::MakeWeak(object, parameter, weak_callback, type);
+ i::GlobalHandles::MakeWeak(location, parameter, weak_callback, type);
}
-
-void* V8::ClearWeak(i::Object** obj) {
- return i::GlobalHandles::ClearWeakness(obj);
+void V8::MakeWeak(i::Object*** location_addr) {
+ i::GlobalHandles::MakeWeak(location_addr);
}
+void* V8::ClearWeak(i::Object** location) {
+ return i::GlobalHandles::ClearWeakness(location);
+}
-void V8::DisposeGlobal(i::Object** obj) {
- i::GlobalHandles::Destroy(obj);
+void V8::DisposeGlobal(i::Object** location) {
+ i::GlobalHandles::Destroy(location);
}
@@ -7483,6 +7483,12 @@ void Isolate::GetStackSample(const RegisterState& state, void** frames,
frames, frames_limit, sample_info);
}
+size_t Isolate::NumberOfPhantomHandleResetsSinceLastCall() {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ size_t result = isolate->global_handles()->NumberOfPhantomHandleResets();
+ isolate->global_handles()->ResetNumberOfPhantomHandleResets();
+ return result;
+}
void Isolate::SetEventLogger(LogEventCallback that) {
// Do not overwrite the event logger if we want to log explicitly.
« no previous file with comments | « include/v8.h ('k') | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698