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

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

Issue 2190353004: [DevTools] Replace InjectedScriptHost.suppressWarningsAndCallFunction with hasOwnProperty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js » ('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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 v8::TryCatch tryCatch(m_context->isolate()); 121 v8::TryCatch tryCatch(m_context->isolate());
122 v8::Local<v8::Value> resultValue = function.callWithoutExceptionHandling(); 122 v8::Local<v8::Value> resultValue = function.callWithoutExceptionHandling();
123 if (tryCatch.HasCaught()) { 123 if (tryCatch.HasCaught()) {
124 *exceptionDetails = createExceptionDetails(tryCatch.Message()); 124 *exceptionDetails = createExceptionDetails(tryCatch.Message());
125 // FIXME: make properties optional 125 // FIXME: make properties optional
126 *properties = Array<PropertyDescriptor>::create(); 126 *properties = Array<PropertyDescriptor>::create();
127 return; 127 return;
128 } 128 }
129 129
130 std::unique_ptr<protocol::Value> protocolValue = toProtocolValue(function.co ntext(), resultValue); 130 std::unique_ptr<protocol::Value> protocolValue = toProtocolValue(m_context-> context(), resultValue);
131 if (hasInternalError(errorString, !protocolValue)) 131 if (hasInternalError(errorString, !protocolValue))
132 return; 132 return;
133 protocol::ErrorSupport errors(errorString); 133 protocol::ErrorSupport errors(errorString);
134 std::unique_ptr<Array<PropertyDescriptor>> result = Array<PropertyDescriptor >::parse(protocolValue.get(), &errors); 134 std::unique_ptr<Array<PropertyDescriptor>> result = Array<PropertyDescriptor >::parse(protocolValue.get(), &errors);
135 if (!hasInternalError(errorString, errors.hasErrors())) 135 if (!hasInternalError(errorString, errors.hasErrors()))
136 *properties = std::move(result); 136 *properties = std::move(result);
137 } 137 }
138 138
139 void InjectedScript::releaseObject(const String16& objectId) 139 void InjectedScript::releaseObject(const String16& objectId)
140 { 140 {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session) 487 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session)
488 { 488 {
489 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId); 489 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId);
490 if (!remoteId) 490 if (!remoteId)
491 return; 491 return;
492 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); 492 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal());
493 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() ); 493 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() );
494 } 494 }
495 495
496 } // namespace blink 496 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698