OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1817 JavaScriptFrame* m_frame; | 1817 JavaScriptFrame* m_frame; |
1818 LiveEdit::FunctionPatchabilityStatus m_saved_status; | 1818 LiveEdit::FunctionPatchabilityStatus m_saved_status; |
1819 }; | 1819 }; |
1820 | 1820 |
1821 | 1821 |
1822 // Finds a drops required frame and all frames above. | 1822 // Finds a drops required frame and all frames above. |
1823 // Returns error message or NULL. | 1823 // Returns error message or NULL. |
1824 const char* LiveEdit::RestartFrame(JavaScriptFrame* frame, Zone* zone) { | 1824 const char* LiveEdit::RestartFrame(JavaScriptFrame* frame, Zone* zone) { |
1825 SingleFrameTarget target(frame); | 1825 SingleFrameTarget target(frame); |
1826 | 1826 |
1827 return DropActivationsInActiveThreadImpl(target, true, zone); | 1827 const char* result = DropActivationsInActiveThreadImpl(target, true, zone); |
1828 if (result != NULL) { | |
1829 return result; | |
1830 } | |
1831 if (target.saved_status() == LiveEdit::FUNCTION_BLOCKED_UNDER_NATIVE_CODE) { | |
1832 return "Function is blocked under native code"; | |
1833 } | |
1834 return NULL; | |
Yang
2012/07/05 08:51:16
Could be shorter:
if (result == NULL &&
targe
| |
1828 } | 1835 } |
1829 | 1836 |
1830 | 1837 |
1831 LiveEditFunctionTracker::LiveEditFunctionTracker(Isolate* isolate, | 1838 LiveEditFunctionTracker::LiveEditFunctionTracker(Isolate* isolate, |
1832 FunctionLiteral* fun) | 1839 FunctionLiteral* fun) |
1833 : isolate_(isolate) { | 1840 : isolate_(isolate) { |
1834 if (isolate_->active_function_info_listener() != NULL) { | 1841 if (isolate_->active_function_info_listener() != NULL) { |
1835 isolate_->active_function_info_listener()->FunctionStarted(fun); | 1842 isolate_->active_function_info_listener()->FunctionStarted(fun); |
1836 } | 1843 } |
1837 } | 1844 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1888 | 1895 |
1889 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 1896 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
1890 return false; | 1897 return false; |
1891 } | 1898 } |
1892 | 1899 |
1893 #endif // ENABLE_DEBUGGER_SUPPORT | 1900 #endif // ENABLE_DEBUGGER_SUPPORT |
1894 | 1901 |
1895 | 1902 |
1896 | 1903 |
1897 } } // namespace v8::internal | 1904 } } // namespace v8::internal |
OLD | NEW |