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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp

Issue 1836653002: [DevTools] Wrap call frame with its injected script instead top injected script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compile-debugger-script
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
index 747a474d0db0d0d8fdbcaf025677c9222f955a95..2daff3bfa46846dc5d4d61f4c6a1f9aa58f82c85 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.cpp
@@ -181,36 +181,4 @@ v8::Local<v8::Object> InjectedScriptManager::createInjectedScript(const String16
return injectedScriptValue.As<v8::Object>();
}
-
-InjectedScriptManager::ScopedGlobalObjectExtension::ScopedGlobalObjectExtension(InjectedScript* current, InjectedScriptManager* manager, v8::MaybeLocal<v8::Object> extension)
- : m_context(current->context())
-{
- v8::Local<v8::Object> extensionObject;
- if (!extension.ToLocal(&extensionObject))
- return;
-
- m_symbol = V8Debugger::scopeExtensionSymbol(current->isolate());
- if (!manager) {
- setOnGlobal(current->context()->Global(), extensionObject);
- } else {
- InjectedScriptManager::IdToInjectedScriptMap::iterator end = manager->m_idToInjectedScript.end();
- for (InjectedScriptManager::IdToInjectedScriptMap::iterator it = manager->m_idToInjectedScript.begin(); it != end; ++it) {
- if (it->second->canAccessInspectedWindow())
- setOnGlobal(it->second->context()->Global(), extensionObject);
- }
- }
-}
-
-InjectedScriptManager::ScopedGlobalObjectExtension::~ScopedGlobalObjectExtension()
-{
- for (size_t i = 0; i < m_globals.size(); ++i)
- m_globals[i]->ToObject(m_context).ToLocalChecked()->Delete(m_context, m_symbol);
-}
-
-void InjectedScriptManager::ScopedGlobalObjectExtension::setOnGlobal(v8::Local<v8::Object> global, v8::Local<v8::Object> extension)
-{
- if (global->Set(m_context, m_symbol, extension).FromMaybe(false))
- m_globals.append(global);
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698