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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.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, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if (!remoteObject) 416 if (!remoteObject)
417 return; 417 return;
418 *result = remoteObject.release(); 418 *result = remoteObject.release();
419 if (exceptionDetails) 419 if (exceptionDetails)
420 *exceptionDetails = createExceptionDetails(tryCatch.Message()); 420 *exceptionDetails = createExceptionDetails(tryCatch.Message());
421 if (wasThrown) 421 if (wasThrown)
422 *wasThrown = true; 422 *wasThrown = true;
423 } 423 }
424 } 424 }
425 425
426 InjectedScript::ScopedGlobalObjectExtension::ScopedGlobalObjectExtension(Injecte dScript* current, v8::MaybeLocal<v8::Object> extension)
427 : m_context(current->context())
428 {
429 v8::Local<v8::Object> extensionObject;
430 if (!extension.ToLocal(&extensionObject))
431 return;
432
433 m_symbol = V8Debugger::scopeExtensionSymbol(current->isolate());
434 v8::Local<v8::Object> global = current->context()->Global();
435 if (global->Set(m_context, m_symbol, extensionObject).FromMaybe(false))
436 m_global = global;
437 }
438
439 InjectedScript::ScopedGlobalObjectExtension::~ScopedGlobalObjectExtension()
440 {
441 v8::Local<v8::Object> global;
442 if (!m_global.ToLocal(&global))
443 return;
444 global->Delete(m_context, m_symbol);
445 }
446
426 } // namespace blink 447 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698