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

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

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return; 59 return;
60 } 60 }
61 61
62 v8::Local<v8::Value> firstArg = args[0]; 62 v8::Local<v8::Value> firstArg = args[0];
63 if (!firstArg->IsArray()) { 63 if (!firstArg->IsArray()) {
64 throwTypeError("First argument of the constructor is not of type Array", args.GetIsolate()); 64 throwTypeError("First argument of the constructor is not of type Array", args.GetIsolate());
65 return; 65 return;
66 } 66 }
67 67
68 String type; 68 String type;
69 String endings = ASCIILiteral("transparent"); 69 String endings = "transparent";
70 70
71 if (args.Length() > 1) { 71 if (args.Length() > 1) {
72 if (!args[1]->IsObject()) { 72 if (!args[1]->IsObject()) {
73 throwTypeError("Second argument of the constructor is not of type Ob ject", args.GetIsolate()); 73 throwTypeError("Second argument of the constructor is not of type Ob ject", args.GetIsolate());
74 return; 74 return;
75 } 75 }
76 76
77 V8TRYCATCH_VOID(Dictionary, dictionary, Dictionary(args[1], args.GetIsol ate())); 77 V8TRYCATCH_VOID(Dictionary, dictionary, Dictionary(args[1], args.GetIsol ate()));
78 78
79 V8TRYCATCH_VOID(bool, containsEndings, dictionary.get("endings", endings )); 79 V8TRYCATCH_VOID(bool, containsEndings, dictionary.get("endings", endings ));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 V8TRYCATCH_VOID(String, stringValue, toWebCoreString(item)); 120 V8TRYCATCH_VOID(String, stringValue, toWebCoreString(item));
121 blobBuilder.append(stringValue, endings); 121 blobBuilder.append(stringValue, endings);
122 } 122 }
123 } 123 }
124 124
125 RefPtr<Blob> blob = blobBuilder.getBlob(type); 125 RefPtr<Blob> blob = blobBuilder.getBlob(type);
126 args.GetReturnValue().Set(toV8(blob.get(), args.Holder(), args.GetIsolate()) ); 126 args.GetReturnValue().Set(toV8(blob.get(), args.Holder(), args.GetIsolate()) );
127 } 127 }
128 128
129 } // namespace WebCore 129 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptEventListener.cpp ('k') | Source/core/accessibility/AccessibilityMediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698