| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 else { | 117 else { |
| 118 JSValue val = exec->argument(0); | 118 JSValue val = exec->argument(0); |
| 119 if (val.isUndefinedOrNull()) | 119 if (val.isUndefinedOrNull()) |
| 120 impl()->send(ec); | 120 impl()->send(ec); |
| 121 else if (val.inherits(&JSDocument::s_info)) | 121 else if (val.inherits(&JSDocument::s_info)) |
| 122 impl()->send(toDocument(val), ec); | 122 impl()->send(toDocument(val), ec); |
| 123 else if (val.inherits(&JSBlob::s_info)) | 123 else if (val.inherits(&JSBlob::s_info)) |
| 124 impl()->send(toBlob(val), ec); | 124 impl()->send(toBlob(val), ec); |
| 125 else if (val.inherits(&JSDOMFormData::s_info)) | 125 else if (val.inherits(&JSDOMFormData::s_info)) |
| 126 impl()->send(toDOMFormData(val), ec); | 126 impl()->send(toDOMFormData(val), ec); |
| 127 #if ENABLE(3D_CANVAS) || ENABLE(BLOB) |
| 128 else if (val.inherits(&JSArrayBuffer::s_info)) |
| 129 impl()->send(toArrayBuffer(val), ec); |
| 130 #endif |
| 127 else | 131 else |
| 128 impl()->send(ustringToString(val.toString(exec)), ec); | 132 impl()->send(ustringToString(val.toString(exec)), ec); |
| 129 } | 133 } |
| 130 | 134 |
| 131 int signedLineNumber; | 135 int signedLineNumber; |
| 132 intptr_t sourceID; | 136 intptr_t sourceID; |
| 133 UString sourceURL; | 137 UString sourceURL; |
| 134 JSValue function; | 138 JSValue function; |
| 135 exec->interpreter()->retrieveLastCaller(exec, signedLineNumber, sourceID, so
urceURL, function); | 139 exec->interpreter()->retrieveLastCaller(exec, signedLineNumber, sourceID, so
urceURL, function); |
| 136 impl()->setLastSendLineNumber(signedLineNumber >= 0 ? signedLineNumber : 0); | 140 impl()->setLastSendLineNumber(signedLineNumber >= 0 ? signedLineNumber : 0); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 JSXMLHttpRequestConstructor* jsConstructor = static_cast<JSXMLHttpRequestCon
structor*>(exec->callee()); | 210 JSXMLHttpRequestConstructor* jsConstructor = static_cast<JSXMLHttpRequestCon
structor*>(exec->callee()); |
| 207 ScriptExecutionContext* context = jsConstructor->scriptExecutionContext(); | 211 ScriptExecutionContext* context = jsConstructor->scriptExecutionContext(); |
| 208 if (!context) | 212 if (!context) |
| 209 return throwVMError(exec, createReferenceError(exec, "XMLHttpRequest con
structor associated document is unavailable")); | 213 return throwVMError(exec, createReferenceError(exec, "XMLHttpRequest con
structor associated document is unavailable")); |
| 210 | 214 |
| 211 RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context); | 215 RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context); |
| 212 return JSValue::encode(CREATE_DOM_OBJECT_WRAPPER(exec, jsConstructor->global
Object(), XMLHttpRequest, xmlHttpRequest.get())); | 216 return JSValue::encode(CREATE_DOM_OBJECT_WRAPPER(exec, jsConstructor->global
Object(), XMLHttpRequest, xmlHttpRequest.get())); |
| 213 } | 217 } |
| 214 | 218 |
| 215 } // namespace WebCore | 219 } // namespace WebCore |
| OLD | NEW |