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

Side by Side Diff: src/inspector/InjectedScript.cpp

Issue 2359533002: [inspector] replaced V8_INSPECTOR* macros with macros from base/macros.h (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « src/inspector/InjectedScript.h ('k') | src/inspector/InspectedContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return nullptr; 93 return nullptr;
94 DCHECK(value->IsFunction()); 94 DCHECK(value->IsFunction());
95 v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(value); 95 v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(value);
96 v8::Local<v8::Object> windowGlobal = context->Global(); 96 v8::Local<v8::Object> windowGlobal = context->Global();
97 v8::Local<v8::Value> info[] = { 97 v8::Local<v8::Value> info[] = {
98 scriptHostWrapper, windowGlobal, 98 scriptHostWrapper, windowGlobal,
99 v8::Number::New(isolate, inspectedContext->contextId())}; 99 v8::Number::New(isolate, inspectedContext->contextId())};
100 v8::MicrotasksScope microtasksScope(isolate, 100 v8::MicrotasksScope microtasksScope(isolate,
101 v8::MicrotasksScope::kDoNotRunMicrotasks); 101 v8::MicrotasksScope::kDoNotRunMicrotasks);
102 v8::Local<v8::Value> injectedScriptValue; 102 v8::Local<v8::Value> injectedScriptValue;
103 if (!function 103 if (!function->Call(context, windowGlobal, arraysize(info), info)
104 ->Call(context, windowGlobal, V8_INSPECTOR_ARRAY_LENGTH(info), info)
105 .ToLocal(&injectedScriptValue)) 104 .ToLocal(&injectedScriptValue))
106 return nullptr; 105 return nullptr;
107 if (!injectedScriptValue->IsObject()) return nullptr; 106 if (!injectedScriptValue->IsObject()) return nullptr;
108 return wrapUnique(new InjectedScript(inspectedContext, 107 return wrapUnique(new InjectedScript(inspectedContext,
109 injectedScriptValue.As<v8::Object>(), 108 injectedScriptValue.As<v8::Object>(),
110 std::move(injectedScriptNative))); 109 std::move(injectedScriptNative)));
111 } 110 }
112 111
113 InjectedScript::InjectedScript( 112 InjectedScript::InjectedScript(
114 InspectedContext* context, v8::Local<v8::Object> object, 113 InspectedContext* context, v8::Local<v8::Object> object,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 void InjectedScript::CallFrameScope::findInjectedScript( 561 void InjectedScript::CallFrameScope::findInjectedScript(
563 V8InspectorSessionImpl* session) { 562 V8InspectorSessionImpl* session) {
564 std::unique_ptr<RemoteCallFrameId> remoteId = 563 std::unique_ptr<RemoteCallFrameId> remoteId =
565 RemoteCallFrameId::parse(m_errorString, m_remoteCallFrameId); 564 RemoteCallFrameId::parse(m_errorString, m_remoteCallFrameId);
566 if (!remoteId) return; 565 if (!remoteId) return;
567 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); 566 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal());
568 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get()); 567 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get());
569 } 568 }
570 569
571 } // namespace v8_inspector 570 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/InjectedScript.h ('k') | src/inspector/InspectedContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698