| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 return Handle<Object>(); | 139 return Handle<Object>(); |
| 140 } else { | 140 } else { |
| 141 isolate->clear_pending_message(); | 141 isolate->clear_pending_message(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 return Handle<Object>(value->ToObjectUnchecked(), isolate); | 144 return Handle<Object>(value->ToObjectUnchecked(), isolate); |
| 145 } | 145 } |
| 146 | 146 |
| 147 | 147 |
| 148 Handle<Object> Execution::Call(Handle<JSFunction> func, | 148 Handle<Object> Execution::Call(Handle<Object> callable, |
| 149 Handle<Object> receiver, | 149 Handle<Object> receiver, |
| 150 int argc, | 150 int argc, |
| 151 Object*** args, | 151 Object*** args, |
| 152 bool* pending_exception) { | 152 bool* pending_exception) { |
| 153 if (!callable->IsJSFunction()) { |
| 154 callable = TryGetFunctionDelegate(callable, pending_exception); |
| 155 if (*pending_exception) return callable; |
| 156 } |
| 157 Handle<JSFunction> func = Handle<JSFunction>::cast(callable); |
| 153 return Invoke(false, func, receiver, argc, args, pending_exception); | 158 return Invoke(false, func, receiver, argc, args, pending_exception); |
| 154 } | 159 } |
| 155 | 160 |
| 156 | 161 |
| 157 Handle<Object> Execution::New(Handle<JSFunction> func, int argc, | 162 Handle<Object> Execution::New(Handle<JSFunction> func, int argc, |
| 158 Object*** args, bool* pending_exception) { | 163 Object*** args, bool* pending_exception) { |
| 159 return Invoke(true, func, Isolate::Current()->global(), argc, args, | 164 return Invoke(true, func, Isolate::Current()->global(), argc, args, |
| 160 pending_exception); | 165 pending_exception); |
| 161 } | 166 } |
| 162 | 167 |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 return isolate->TerminateExecution(); | 840 return isolate->TerminateExecution(); |
| 836 } | 841 } |
| 837 if (stack_guard->IsInterrupted()) { | 842 if (stack_guard->IsInterrupted()) { |
| 838 stack_guard->Continue(INTERRUPT); | 843 stack_guard->Continue(INTERRUPT); |
| 839 return isolate->StackOverflow(); | 844 return isolate->StackOverflow(); |
| 840 } | 845 } |
| 841 return isolate->heap()->undefined_value(); | 846 return isolate->heap()->undefined_value(); |
| 842 } | 847 } |
| 843 | 848 |
| 844 } } // namespace v8::internal | 849 } } // namespace v8::internal |
| OLD | NEW |