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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp

Issue 1992493002: [DevTools] Pass bindRemoteObject function to Custom Formatter directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 scope.injectedScript()->wrapEvaluateResult(errorString, maybeFunctionVal ue, scope.tryCatch(), scope.objectGroupName(), false, false, result, wasThrown, nullptr); 176 scope.injectedScript()->wrapEvaluateResult(errorString, maybeFunctionVal ue, scope.tryCatch(), scope.objectGroupName(), false, false, result, wasThrown, nullptr);
177 return; 177 return;
178 } 178 }
179 179
180 v8::Local<v8::Value> functionValue; 180 v8::Local<v8::Value> functionValue;
181 if (!maybeFunctionValue.ToLocal(&functionValue) || !functionValue->IsFunctio n()) { 181 if (!maybeFunctionValue.ToLocal(&functionValue) || !functionValue->IsFunctio n()) {
182 *errorString = "Given expression does not evaluate to a function"; 182 *errorString = "Given expression does not evaluate to a function";
183 return; 183 return;
184 } 184 }
185 185
186 if (!scope.installRemoteObjectAPI(scope.objectGroupName()))
187 return;
188
189 v8::MaybeLocal<v8::Value> maybeResultValue = m_debugger->callFunction(functi onValue.As<v8::Function>(), scope.context(), scope.object(), argc, argv.get()); 186 v8::MaybeLocal<v8::Value> maybeResultValue = m_debugger->callFunction(functi onValue.As<v8::Function>(), scope.context(), scope.object(), argc, argv.get());
190 // Re-initialize after running client's code, as it could have destroyed con text or session. 187 // Re-initialize after running client's code, as it could have destroyed con text or session.
191 if (!scope.initialize()) 188 if (!scope.initialize())
192 return; 189 return;
193 190
194 scope.injectedScript()->wrapEvaluateResult(errorString, maybeResultValue, sc ope.tryCatch(), scope.objectGroupName(), returnByValue.fromMaybe(false), generat ePreview.fromMaybe(false), result, wasThrown, nullptr); 191 scope.injectedScript()->wrapEvaluateResult(errorString, maybeResultValue, sc ope.tryCatch(), scope.objectGroupName(), returnByValue.fromMaybe(false), generat ePreview.fromMaybe(false), result, wasThrown, nullptr);
195 } 192 }
196 193
197 void V8RuntimeAgentImpl::getProperties( 194 void V8RuntimeAgentImpl::getProperties(
198 ErrorString* errorString, 195 ErrorString* errorString,
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 } 428 }
432 } 429 }
433 430
434 void V8RuntimeAgentImpl::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> obj ectToInspect, PassOwnPtr<protocol::DictionaryValue> hints) 431 void V8RuntimeAgentImpl::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> obj ectToInspect, PassOwnPtr<protocol::DictionaryValue> hints)
435 { 432 {
436 if (m_enabled) 433 if (m_enabled)
437 m_frontend->inspectRequested(std::move(objectToInspect), std::move(hints )); 434 m_frontend->inspectRequested(std::move(objectToInspect), std::move(hints ));
438 } 435 }
439 436
440 } // namespace blink 437 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698