| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * Copyright (C) 2013 Google Inc. All rights reserved. |   2  * Copyright (C) 2013 Google Inc. All rights reserved. | 
|   3  * |   3  * | 
|   4  * Redistribution and use in source and binary forms, with or without |   4  * Redistribution and use in source and binary forms, with or without | 
|   5  * modification, are permitted provided that the following conditions are |   5  * modification, are permitted provided that the following conditions are | 
|   6  * met: |   6  * met: | 
|   7  * |   7  * | 
|   8  *     * Redistributions of source code must retain the above copyright |   8  *     * Redistributions of source code must retain the above copyright | 
|   9  * notice, this list of conditions and the following disclaimer. |   9  * notice, this list of conditions and the following disclaimer. | 
|  10  *     * Redistributions in binary form must reproduce the above |  10  *     * Redistributions in binary form must reproduce the above | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  62     v8::Isolate* isolate = v8::Isolate::GetCurrent(); |  62     v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 
|  63     v8::HandleScope handleScope(isolate); |  63     v8::HandleScope handleScope(isolate); | 
|  64  |  64  | 
|  65     v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
    world.get()); |  65     v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
    world.get()); | 
|  66     if (v8Context.IsEmpty()) |  66     if (v8Context.IsEmpty()) | 
|  67         return true; |  67         return true; | 
|  68  |  68  | 
|  69     v8::Context::Scope scope(v8Context); |  69     v8::Context::Scope scope(v8Context); | 
|  70  |  70  | 
|  71 {% for argument in method.arguments %} |  71 {% for argument in method.arguments %} | 
|  72     {{argument.cpp_to_js_conversion | indent(4)}} |  72     {{argument.cpp_to_v8_conversion | indent}} | 
|  73     if ({{argument.name}}Handle.IsEmpty()) { |  73     if ({{argument.name}}Handle.IsEmpty()) { | 
|  74         if (!isScriptControllerTerminating()) |  74         if (!isScriptControllerTerminating()) | 
|  75             CRASH(); |  75             CRASH(); | 
|  76         return true; |  76         return true; | 
|  77     } |  77     } | 
|  78 {% endfor %} |  78 {% endfor %} | 
|  79 {% if method.arguments | length > 0 %} |  79 {% if method.arguments | length > 0 %} | 
|  80     v8::Handle<v8::Value> argv[] = { {{method.handles}} }; |  80     v8::Handle<v8::Value> argv[] = { {{method.handles}} }; | 
|  81 {% else %} |  81 {% else %} | 
|  82     v8::Handle<v8::Value> *argv = 0; |  82     v8::Handle<v8::Value> *argv = 0; | 
|  83 {% endif %} |  83 {% endif %} | 
|  84  |  84  | 
|  85     bool callbackReturnValue = false; |  85     bool callbackReturnValue = false; | 
|  86     return !invokeCallback(m_callback.newLocal(isolate), {{method.arguments | le
    ngth}}, argv, callbackReturnValue, scriptExecutionContext()); |  86     return !invokeCallback(m_callback.newLocal(isolate), {{method.arguments | le
    ngth}}, argv, callbackReturnValue, scriptExecutionContext()); | 
|  87 } |  87 } | 
|  88  |  88  | 
|  89 {% endif %} |  89 {% endif %} | 
|  90 {% endfor %}{# for method in methods #} |  90 {% endfor %}{# for method in methods #} | 
|  91 } // namespace WebCore |  91 } // namespace WebCore | 
|  92  |  92  | 
|  93 {% if conditional_string %} |  93 {% if conditional_string %} | 
|  94 #endif // {{conditional_string}} |  94 #endif // {{conditional_string}} | 
|  95 {% endif %} |  95 {% endif %} | 
| OLD | NEW |