OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 lineOffset: script.lineOffset(), | 889 lineOffset: script.lineOffset(), |
890 columnOffset: script.columnOffset(), | 890 columnOffset: script.columnOffset(), |
891 lineCount: script.lineCount() | 891 lineCount: script.lineCount() |
892 }; | 892 }; |
893 } | 893 } |
894 | 894 |
895 return SimpleObjectToJSON_(o); | 895 return SimpleObjectToJSON_(o); |
896 }; | 896 }; |
897 | 897 |
898 | 898 |
899 function MakeCompileEvent(script_source, script_name, script_function, before) { | 899 function MakeCompileEvent(exec_state, script, before) { |
900 return new CompileEvent(script_source, script_name, script_function, before); | 900 return new CompileEvent(exec_state, script, before); |
901 } | 901 } |
902 | 902 |
903 | 903 |
904 function CompileEvent(script_source, script_name, script_function, before) { | 904 function CompileEvent(exec_state, script, before) { |
905 this.scriptSource = script_source; | 905 this.exec_state_ = exec_state; |
906 this.scriptName = script_name; | 906 this.script_ = MakeMirror(script); |
907 this.scriptFunction = script_function; | 907 this.before_ = before; |
908 this.before = before; | |
909 } | 908 } |
910 | 909 |
911 | 910 |
| 911 CompileEvent.prototype.executionState = function() { |
| 912 return this.exec_state_; |
| 913 }; |
| 914 |
| 915 |
912 CompileEvent.prototype.eventType = function() { | 916 CompileEvent.prototype.eventType = function() { |
913 if (this.before) { | 917 if (this.before_) { |
914 return Debug.DebugEvent.BeforeComplie; | 918 return Debug.DebugEvent.BeforeCompile; |
915 } else { | 919 } else { |
916 return Debug.DebugEvent.AfterComplie; | 920 return Debug.DebugEvent.AfterCompile; |
917 } | 921 } |
918 }; | 922 }; |
919 | 923 |
920 | 924 |
| 925 CompileEvent.prototype.script = function() { |
| 926 return this.script_; |
| 927 }; |
| 928 |
| 929 |
921 function MakeNewFunctionEvent(func) { | 930 function MakeNewFunctionEvent(func) { |
922 return new NewFunctionEvent(func); | 931 return new NewFunctionEvent(func); |
923 } | 932 } |
924 | 933 |
925 | 934 |
926 function NewFunctionEvent(func) { | 935 function NewFunctionEvent(func) { |
927 this.func = func; | 936 this.func = func; |
928 } | 937 } |
929 | 938 |
930 | 939 |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 json += NumberToJSON_(elem); | 1672 json += NumberToJSON_(elem); |
1664 } else if (IS_STRING(elem)) { | 1673 } else if (IS_STRING(elem)) { |
1665 json += StringToJSON_(elem); | 1674 json += StringToJSON_(elem); |
1666 } else { | 1675 } else { |
1667 json += elem; | 1676 json += elem; |
1668 } | 1677 } |
1669 } | 1678 } |
1670 json += ']'; | 1679 json += ']'; |
1671 return json; | 1680 return json; |
1672 } | 1681 } |
OLD | NEW |