Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: Source/bindings/v8/custom/V8FormDataCustom.cpp

Issue 125043004: Remove world type from hasInstance() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 { 43 {
44 if (info.Length() < 2) { 44 if (info.Length() < 2) {
45 throwError(v8SyntaxError, "Not enough arguments", info.GetIsolate()); 45 throwError(v8SyntaxError, "Not enough arguments", info.GetIsolate());
46 return; 46 return;
47 } 47 }
48 48
49 DOMFormData* domFormData = V8FormData::toNative(info.Holder()); 49 DOMFormData* domFormData = V8FormData::toNative(info.Holder());
50 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, name, info[0]); 50 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, name, info[0]);
51 51
52 v8::Handle<v8::Value> arg = info[1]; 52 v8::Handle<v8::Value> arg = info[1];
53 if (V8Blob::hasInstance(arg, info.GetIsolate(), worldType(info.GetIsolate()) )) { 53 if (V8Blob::hasInstance(arg, info.GetIsolate())) {
54 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); 54 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
55 Blob* blob = V8Blob::toNative(object); 55 Blob* blob = V8Blob::toNative(object);
56 ASSERT(blob); 56 ASSERT(blob);
57 57
58 String filename; 58 String filename;
59 if (info.Length() >= 3) { 59 if (info.Length() >= 3) {
60 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedO rNullCheck>, filenameResource, info[2]); 60 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedO rNullCheck>, filenameResource, info[2]);
61 filename = filenameResource; 61 filename = filenameResource;
62 } 62 }
63 63
64 domFormData->append(name, blob, filename); 64 domFormData->append(name, blob, filename);
65 } else { 65 } else {
66 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, argString, arg) ; 66 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, argString, arg) ;
67 domFormData->append(name, argString); 67 domFormData->append(name, argString);
68 } 68 }
69 } 69 }
70 70
71 } // namespace WebCore 71 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8DocumentCustom.cpp ('k') | Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698