OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 #include "src/v8.h" | 6 #include "src/v8.h" |
7 | 7 |
8 #include "src/liveedit.h" | 8 #include "src/liveedit.h" |
9 | 9 |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 | 837 |
838 FunctionInfoListener listener(isolate); | 838 FunctionInfoListener listener(isolate); |
839 Handle<Object> original_source = | 839 Handle<Object> original_source = |
840 Handle<Object>(script->source(), isolate); | 840 Handle<Object>(script->source(), isolate); |
841 script->set_source(*source); | 841 script->set_source(*source); |
842 isolate->set_active_function_info_listener(&listener); | 842 isolate->set_active_function_info_listener(&listener); |
843 | 843 |
844 { | 844 { |
845 // Creating verbose TryCatch from public API is currently the only way to | 845 // Creating verbose TryCatch from public API is currently the only way to |
846 // force code save location. We do not use this the object directly. | 846 // force code save location. We do not use this the object directly. |
847 v8::TryCatch try_catch; | 847 v8::TryCatch try_catch(reinterpret_cast<v8::Isolate*>(isolate)); |
848 try_catch.SetVerbose(true); | 848 try_catch.SetVerbose(true); |
849 | 849 |
850 // A logical 'try' section. | 850 // A logical 'try' section. |
851 Compiler::CompileForLiveEdit(script); | 851 Compiler::CompileForLiveEdit(script); |
852 } | 852 } |
853 | 853 |
854 // A logical 'catch' section. | 854 // A logical 'catch' section. |
855 Handle<JSObject> rethrow_exception; | 855 Handle<JSObject> rethrow_exception; |
856 if (isolate->has_pending_exception()) { | 856 if (isolate->has_pending_exception()) { |
857 Handle<Object> exception(isolate->pending_exception(), isolate); | 857 Handle<Object> exception(isolate->pending_exception(), isolate); |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2054 void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) { | 2054 void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) { |
2055 isolate_->active_function_info_listener()->FunctionCode(code); | 2055 isolate_->active_function_info_listener()->FunctionCode(code); |
2056 } | 2056 } |
2057 | 2057 |
2058 | 2058 |
2059 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 2059 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
2060 return isolate->active_function_info_listener() != NULL; | 2060 return isolate->active_function_info_listener() != NULL; |
2061 } | 2061 } |
2062 | 2062 |
2063 } } // namespace v8::internal | 2063 } } // namespace v8::internal |
OLD | NEW |