@@ -10001,6 +10001,47 @@ debug::TypeProfile::ScriptData debug::TypeProfile::GetScriptData(
1000110001 return ScriptData (i, type_profile_);
1000210002}
1000310003
10004+ v8::MaybeLocal<v8::Value> debug::WeakMap::Get (v8::Local<v8::Context> context,
10005+ v8::Local<v8::Value> key) {
10006+ PREPARE_FOR_EXECUTION (context, WeakMap, Get, Value);
10007+ auto self = Utils::OpenHandle (this );
10008+ Local<Value> result;
10009+ i::Handle<i::Object> argv[] = {Utils::OpenHandle (*key)};
10010+ has_pending_exception =
10011+ !ToLocal<Value>(i::Execution::Call (isolate, isolate->weakmap_get (), self,
10012+ arraysize (argv), argv),
10013+ &result);
10014+ RETURN_ON_FAILED_EXECUTION (Value);
10015+ RETURN_ESCAPED (result);
10016+ }
10017+
10018+ v8::MaybeLocal<debug::WeakMap> debug::WeakMap::Set (
10019+ v8::Local<v8::Context> context, v8::Local<v8::Value> key,
10020+ v8::Local<v8::Value> value) {
10021+ PREPARE_FOR_EXECUTION (context, WeakMap, Set, WeakMap);
10022+ auto self = Utils::OpenHandle (this );
10023+ i::Handle<i::Object> result;
10024+ i::Handle<i::Object> argv[] = {Utils::OpenHandle (*key),
10025+ Utils::OpenHandle (*value)};
10026+ has_pending_exception = !i::Execution::Call (isolate, isolate->weakmap_set (),
10027+ self, arraysize (argv), argv)
10028+ .ToHandle (&result);
10029+ RETURN_ON_FAILED_EXECUTION (WeakMap);
10030+ RETURN_ESCAPED (Local<WeakMap>::Cast (Utils::ToLocal (result)));
10031+ }
10032+
10033+ Local<debug::WeakMap> debug::WeakMap::New (v8::Isolate* isolate) {
10034+ i::Isolate* i_isolate = reinterpret_cast <i::Isolate*>(isolate);
10035+ LOG_API (i_isolate, WeakMap, New);
10036+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION (i_isolate);
10037+ i::Handle<i::JSWeakMap> obj = i_isolate->factory ()->NewJSWeakMap ();
10038+ return ToApiHandle<debug::WeakMap>(obj);
10039+ }
10040+
10041+ debug::WeakMap* debug::WeakMap::Cast (v8::Value* value) {
10042+ return static_cast <debug::WeakMap*>(value);
10043+ }
10044+
1000410045const char * CpuProfileNode::GetFunctionNameStr () const {
1000510046 const i::ProfileNode* node = reinterpret_cast <const i::ProfileNode*>(this );
1000610047 return node->entry ()->name ();
0 commit comments