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 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 if (!context_value_mirror) { | 2071 if (!context_value_mirror) { |
2072 return response.failed("Context object '" + mapping.name + | 2072 return response.failed("Context object '" + mapping.name + |
2073 "' #" + mapping.handle + "# not found"); | 2073 "' #" + mapping.handle + "# not found"); |
2074 } | 2074 } |
2075 additional_context_object[mapping.name] = context_value_mirror.value(); | 2075 additional_context_object[mapping.name] = context_value_mirror.value(); |
2076 } | 2076 } |
2077 } | 2077 } |
2078 | 2078 |
2079 // Global evaluate. | 2079 // Global evaluate. |
2080 if (global) { | 2080 if (global) { |
2081 // Evaluate in the global context. | 2081 // Evaluate in the native context. |
2082 response.body = this.exec_state_.evaluateGlobal( | 2082 response.body = this.exec_state_.evaluateGlobal( |
2083 expression, Boolean(disable_break), additional_context_object); | 2083 expression, Boolean(disable_break), additional_context_object); |
2084 return; | 2084 return; |
2085 } | 2085 } |
2086 | 2086 |
2087 // Default value for disable_break is true. | 2087 // Default value for disable_break is true. |
2088 if (IS_UNDEFINED(disable_break)) { | 2088 if (IS_UNDEFINED(disable_break)) { |
2089 disable_break = true; | 2089 disable_break = true; |
2090 } | 2090 } |
2091 | 2091 |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2656 case 'string': | 2656 case 'string': |
2657 case 'number': | 2657 case 'number': |
2658 json = value; | 2658 json = value; |
2659 break; | 2659 break; |
2660 | 2660 |
2661 default: | 2661 default: |
2662 json = null; | 2662 json = null; |
2663 } | 2663 } |
2664 return json; | 2664 return json; |
2665 } | 2665 } |
OLD | NEW |