Lines Matching defs:context
8 #include "include/v8-context.h"
14 #include "src/inspector/inspected-context.h"
57 InspectedContext* context = m_inspector->getContext(m_groupId, m_contextId);
58 if (!context) return nullptr;
59 return context->getInjectedScript(sessionId);
170 v8::Local<v8::Context> context, v8::Local<v8::Object> console,
174 toV8StringInternalized(context->GetIsolate(), name);
176 if (!v8::Function::New(context, callback, data, 0,
181 createDataProperty(context, console, funcName, func);
614 v8::Local<v8::Context> context = isolate->GetCurrentContext();
615 if (!obj->GetOwnPropertyNames(context).ToLocal(&names)) return;
619 if (!names->Get(context, i).ToLocal(&key)) continue;
621 if (!obj->Get(context, key).ToLocal(&value)) continue;
622 createDataProperty(context, values, i, value);
792 void V8Console::installMemoryGetter(v8::Local<v8::Context> context,
794 v8::Isolate* isolate = context->GetIsolate();
799 context, &V8Console::call<&V8Console::memoryGetterCallback>, data, 0,
802 v8::Function::New(context,
809 void V8Console::installAsyncStackTaggingAPI(v8::Local<v8::Context> context,
811 v8::Isolate* isolate = context->GetIsolate();
818 ->Set(context, toV8StringInternalized(isolate, "scheduleAsyncTask"),
819 v8::Function::New(context,
826 ->Set(context, toV8StringInternalized(isolate, "startAsyncTask"),
827 v8::Function::New(context,
834 ->Set(context, toV8StringInternalized(isolate, "finishAsyncTask"),
835 v8::Function::New(context,
842 ->Set(context, toV8StringInternalized(isolate, "cancelAsyncTask"),
843 v8::Function::New(context,
852 v8::Local<v8::Context> context, int sessionId) {
853 v8::Isolate* isolate = context->GetIsolate();
859 commandLineAPI->SetPrototype(context, v8::Null(isolate)).FromMaybe(false);
867 createBoundFunctionProperty(context, commandLineAPI, data, "dir",
869 createBoundFunctionProperty(context, commandLineAPI, data, "dirxml",
871 createBoundFunctionProperty(context, commandLineAPI, data, "profile",
873 createBoundFunctionProperty(context, commandLineAPI, data, "profileEnd",
875 createBoundFunctionProperty(context, commandLineAPI, data, "clear",
877 createBoundFunctionProperty(context, commandLineAPI, data, "table",
880 createBoundFunctionProperty(context, commandLineAPI, data, "keys",
883 createBoundFunctionProperty(context, commandLineAPI, data, "values",
887 context, commandLineAPI, data, "debug",
890 context, commandLineAPI, data, "undebug",
893 context, commandLineAPI, data, "monitor",
896 context, commandLineAPI, data, "unmonitor",
898 createBoundFunctionProperty(context, commandLineAPI, data, "inspect",
900 createBoundFunctionProperty(context, commandLineAPI, data, "copy",
903 context, commandLineAPI, data, "queryObjects",
906 context, commandLineAPI, data, "$_",
909 createBoundFunctionProperty(context, commandLineAPI, data, "$0",
912 createBoundFunctionProperty(context, commandLineAPI, data, "$1",
915 createBoundFunctionProperty(context, commandLineAPI, data, "$2",
918 createBoundFunctionProperty(context, commandLineAPI, data, "$3",
921 createBoundFunctionProperty(context, commandLineAPI, data, "$4",
925 m_inspector->client()->installAdditionalCommandLineAPI(context,
941 v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
943 USE(info.Holder()->Delete(context, name).FromMaybe(false));
949 if (!commandLineAPI->Get(context, name).ToLocal(&value)) return;
956 ->Call(context, commandLineAPI, 0, nullptr)
970 v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
971 if (!info.Holder()->Delete(context, name).FromMaybe(false)) return;
972 if (!info.Holder()->CreateDataProperty(context, name, value).FromMaybe(false))
974 USE(scope->m_installedMethods->Delete(context, name).FromMaybe(false));
978 v8::Local<v8::Context> context, v8::Local<v8::Object> commandLineAPI,
980 : m_context(context),
983 m_installedMethods(v8::Set::New(context->GetIsolate())) {
984 v8::MicrotasksScope microtasksScope(context->GetIsolate(),
987 if (!m_commandLineAPI->GetOwnPropertyNames(context).ToLocal(&names)) return;
989 v8::ArrayBuffer::New(context->GetIsolate(), sizeof(CommandLineAPIScope*));
994 if (!names->Get(context, i).ToLocal(&name) || !name->IsName()) continue;
995 if (m_global->Has(context, name).FromMaybe(true)) continue;
996 if (!m_installedMethods->Add(context, name).ToLocal(&m_installedMethods))
999 ->SetAccessor(context, name.As<v8::Name>(),
1005 bool removed = m_installedMethods->Delete(context, name).FromMaybe(false);