| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // open(method, url, async, user) | 165 // open(method, url, async, user) |
| 166 // open(method, url, async, user, passwd) | 166 // open(method, url, async, user, passwd) |
| 167 | 167 |
| 168 if (args.Length() < 2) { | 168 if (args.Length() < 2) { |
| 169 throwNotEnoughArgumentsError(args.GetIsolate()); | 169 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 170 return; | 170 return; |
| 171 } | 171 } |
| 172 | 172 |
| 173 XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder()); | 173 XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder()); |
| 174 | 174 |
| 175 String method = toWebCoreString(args[0]); | 175 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, method, args[0]); |
| 176 String urlstring = toWebCoreString(args[1]); | 176 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, urlstring, args[1])
; |
| 177 | 177 |
| 178 ScriptExecutionContext* context = getScriptExecutionContext(); | 178 ScriptExecutionContext* context = getScriptExecutionContext(); |
| 179 KURL url = context->completeURL(urlstring); | 179 KURL url = context->completeURL(urlstring); |
| 180 | 180 |
| 181 ExceptionState es(args.GetIsolate()); | 181 ExceptionState es(args.GetIsolate()); |
| 182 | 182 |
| 183 if (args.Length() >= 3) { | 183 if (args.Length() >= 3) { |
| 184 bool async = args[2]->BooleanValue(); | 184 bool async = args[2]->BooleanValue(); |
| 185 | 185 |
| 186 if (args.Length() >= 4 && !args[3]->IsUndefined()) { | 186 if (args.Length() >= 4 && !args[3]->IsUndefined()) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 ASSERT(arrayBufferView); | 248 ASSERT(arrayBufferView); |
| 249 xmlHttpRequest->send(arrayBufferView, es); | 249 xmlHttpRequest->send(arrayBufferView, es); |
| 250 } else | 250 } else |
| 251 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), es); | 251 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), es); |
| 252 } | 252 } |
| 253 | 253 |
| 254 es.throwIfNeeded(); | 254 es.throwIfNeeded(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 } // namespace WebCore | 257 } // namespace WebCore |
| OLD | NEW |