@@ -9950,6 +9950,47 @@ debug::TypeProfile::ScriptData debug::TypeProfile::GetScriptData(
9950
9950
return ScriptData (i, type_profile_);
9951
9951
}
9952
9952
9953
+ v8::MaybeLocal<v8::Value> debug::WeakMap::Get (v8::Local<v8::Context> context,
9954
+ v8::Local<v8::Value> key) {
9955
+ PREPARE_FOR_EXECUTION (context, WeakMap, Get, Value);
9956
+ auto self = Utils::OpenHandle (this );
9957
+ Local<Value> result;
9958
+ i::Handle<i::Object> argv[] = {Utils::OpenHandle (*key)};
9959
+ has_pending_exception =
9960
+ !ToLocal<Value>(i::Execution::Call (isolate, isolate->weakmap_get (), self,
9961
+ arraysize (argv), argv),
9962
+ &result);
9963
+ RETURN_ON_FAILED_EXECUTION (Value);
9964
+ RETURN_ESCAPED (result);
9965
+ }
9966
+
9967
+ v8::MaybeLocal<debug::WeakMap> debug::WeakMap::Set (
9968
+ v8::Local<v8::Context> context, v8::Local<v8::Value> key,
9969
+ v8::Local<v8::Value> value) {
9970
+ PREPARE_FOR_EXECUTION (context, WeakMap, Set, WeakMap);
9971
+ auto self = Utils::OpenHandle (this );
9972
+ i::Handle<i::Object> result;
9973
+ i::Handle<i::Object> argv[] = {Utils::OpenHandle (*key),
9974
+ Utils::OpenHandle (*value)};
9975
+ has_pending_exception = !i::Execution::Call (isolate, isolate->weakmap_set (),
9976
+ self, arraysize (argv), argv)
9977
+ .ToHandle (&result);
9978
+ RETURN_ON_FAILED_EXECUTION (WeakMap);
9979
+ RETURN_ESCAPED (Local<WeakMap>::Cast (Utils::ToLocal (result)));
9980
+ }
9981
+
9982
+ Local<debug::WeakMap> debug::WeakMap::New (v8::Isolate* isolate) {
9983
+ i::Isolate* i_isolate = reinterpret_cast <i::Isolate*>(isolate);
9984
+ LOG_API (i_isolate, WeakMap, New);
9985
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION (i_isolate);
9986
+ i::Handle<i::JSWeakMap> obj = i_isolate->factory ()->NewJSWeakMap ();
9987
+ return ToApiHandle<debug::WeakMap>(obj);
9988
+ }
9989
+
9990
+ debug::WeakMap* debug::WeakMap::Cast (v8::Value* value) {
9991
+ return static_cast <debug::WeakMap*>(value);
9992
+ }
9993
+
9953
9994
const char * CpuProfileNode::GetFunctionNameStr () const {
9954
9995
const i::ProfileNode* node = reinterpret_cast <const i::ProfileNode*>(this );
9955
9996
return node->entry ()->name ();
0 commit comments