| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, 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 28 matching lines...) Expand all Loading... |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class JavaScriptCallFrame { | 41 class JavaScriptCallFrame { |
| 42 public: | 42 public: |
| 43 static PassOwnPtr<JavaScriptCallFrame> create(v8::Local<v8::Context> debugge
rContext, v8::Local<v8::Object> callFrame) | 43 static PassOwnPtr<JavaScriptCallFrame> create(v8::Local<v8::Context> debugge
rContext, v8::Local<v8::Object> callFrame) |
| 44 { | 44 { |
| 45 return adoptPtr(new JavaScriptCallFrame(debuggerContext, callFrame)); | 45 return adoptPtr(new JavaScriptCallFrame(debuggerContext, callFrame)); |
| 46 } | 46 } |
| 47 ~JavaScriptCallFrame(); | 47 ~JavaScriptCallFrame(); |
| 48 | 48 |
| 49 PassOwnPtr<JavaScriptCallFrame> caller(); | |
| 50 | |
| 51 int sourceID() const; | 49 int sourceID() const; |
| 52 int line() const; | 50 int line() const; |
| 53 int column() const; | 51 int column() const; |
| 54 | 52 |
| 55 bool isAtReturn() const; | 53 bool isAtReturn() const; |
| 56 v8::Local<v8::Object> details() const; | 54 v8::Local<v8::Object> details() const; |
| 57 | 55 |
| 58 v8::MaybeLocal<v8::Value> evaluate(v8::Local<v8::Value> expression); | 56 v8::MaybeLocal<v8::Value> evaluate(v8::Local<v8::Value> expression); |
| 59 v8::MaybeLocal<v8::Value> restart(); | 57 v8::MaybeLocal<v8::Value> restart(); |
| 60 v8::MaybeLocal<v8::Value> setVariableValue(int scopeNumber, v8::Local<v8::Va
lue> variableName, v8::Local<v8::Value> newValue); | 58 v8::MaybeLocal<v8::Value> setVariableValue(int scopeNumber, v8::Local<v8::Va
lue> variableName, v8::Local<v8::Value> newValue); |
| 61 private: | 59 private: |
| 62 JavaScriptCallFrame(v8::Local<v8::Context> debuggerContext, v8::Local<v8::Ob
ject> callFrame); | 60 JavaScriptCallFrame(v8::Local<v8::Context> debuggerContext, v8::Local<v8::Ob
ject> callFrame); |
| 63 | 61 |
| 64 int callV8FunctionReturnInt(const char* name) const; | 62 int callV8FunctionReturnInt(const char* name) const; |
| 65 | 63 |
| 66 v8::Isolate* m_isolate; | 64 v8::Isolate* m_isolate; |
| 67 OwnPtr<JavaScriptCallFrame> m_caller; | 65 OwnPtr<JavaScriptCallFrame> m_caller; |
| 68 v8::Global<v8::Context> m_debuggerContext; | 66 v8::Global<v8::Context> m_debuggerContext; |
| 69 v8::Global<v8::Object> m_callFrame; | 67 v8::Global<v8::Object> m_callFrame; |
| 70 v8::Global<v8::FunctionTemplate> m_wrapperTemplate; | 68 v8::Global<v8::FunctionTemplate> m_wrapperTemplate; |
| 71 }; | 69 }; |
| 72 | 70 |
| 71 using JavaScriptCallFrames = Vector<OwnPtr<JavaScriptCallFrame>>; |
| 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| 74 | 74 |
| 75 #endif // JavaScriptCallFrame_h | 75 #endif // JavaScriptCallFrame_h |
| OLD | NEW |