| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2010-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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 v8::Local<v8::Value> ScriptDebugServer::collectionEntries(v8::Local<v8::Object>&
object) | 725 v8::Local<v8::Value> ScriptDebugServer::collectionEntries(v8::Local<v8::Object>&
object) |
| 726 { | 726 { |
| 727 if (!enabled()) { | 727 if (!enabled()) { |
| 728 ASSERT_NOT_REACHED(); | 728 ASSERT_NOT_REACHED(); |
| 729 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); | 729 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); |
| 730 } | 730 } |
| 731 v8::Local<v8::Value> argv[] = { object }; | 731 v8::Local<v8::Value> argv[] = { object }; |
| 732 return callDebuggerMethod("getCollectionEntries", 1, argv).ToLocalChecked(); | 732 return callDebuggerMethod("getCollectionEntries", 1, argv).ToLocalChecked(); |
| 733 } | 733 } |
| 734 | 734 |
| 735 v8::Local<v8::Value> ScriptDebugServer::getInternalProperties(v8::Local<v8::Obje
ct>& object) | |
| 736 { | |
| 737 if (!enabled()) { | |
| 738 // FIXME: provide a way to collect internal properties without enabling
debugger. See crbug.com/485451 | |
| 739 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); | |
| 740 } | |
| 741 v8::Local<v8::Value> argv[] = { object }; | |
| 742 return callDebuggerMethod("getInternalProperties", 1, argv).ToLocalChecked()
; | |
| 743 } | |
| 744 | |
| 745 v8::MaybeLocal<v8::Value> ScriptDebugServer::setFunctionVariableValue(v8::Local<
v8::Value> functionValue, int scopeNumber, const String& variableName, v8::Local
<v8::Value> newValue) | 735 v8::MaybeLocal<v8::Value> ScriptDebugServer::setFunctionVariableValue(v8::Local<
v8::Value> functionValue, int scopeNumber, const String& variableName, v8::Local
<v8::Value> newValue) |
| 746 { | 736 { |
| 747 if (m_debuggerScript.IsEmpty()) { | 737 if (m_debuggerScript.IsEmpty()) { |
| 748 ASSERT_NOT_REACHED(); | 738 ASSERT_NOT_REACHED(); |
| 749 return m_isolate->ThrowException(v8::String::NewFromUtf8(m_isolate, "Deb
ugging is not enabled.", v8::NewStringType::kNormal).ToLocalChecked()); | 739 return m_isolate->ThrowException(v8::String::NewFromUtf8(m_isolate, "Deb
ugging is not enabled.", v8::NewStringType::kNormal).ToLocalChecked()); |
| 750 } | 740 } |
| 751 | 741 |
| 752 v8::Local<v8::Value> argv[] = { | 742 v8::Local<v8::Value> argv[] = { |
| 753 functionValue, | 743 functionValue, |
| 754 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), | 744 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), |
| 755 v8String(m_isolate, variableName), | 745 v8String(m_isolate, variableName), |
| 756 newValue | 746 newValue |
| 757 }; | 747 }; |
| 758 return callDebuggerMethod("setFunctionVariableValue", 4, argv); | 748 return callDebuggerMethod("setFunctionVariableValue", 4, argv); |
| 759 } | 749 } |
| 760 | 750 |
| 761 | 751 |
| 762 bool ScriptDebugServer::isPaused() | 752 bool ScriptDebugServer::isPaused() |
| 763 { | 753 { |
| 764 return m_pausedScriptState; | 754 return m_pausedScriptState; |
| 765 } | 755 } |
| 766 | 756 |
| 767 } // namespace blink | 757 } // namespace blink |
| OLD | NEW |