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

Side by Side Diff: Source/bindings/core/v8/custom/V8FileCustom.cpp

Issue 687573002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 TOSTRING_VOID(V8StringResource<>, fileName, info[1]); 56 TOSTRING_VOID(V8StringResource<>, fileName, info[1]);
57 57
58 V8BlobCustomHelpers::ParsedProperties properties(true); 58 V8BlobCustomHelpers::ParsedProperties properties(true);
59 if (info.Length() > 2) { 59 if (info.Length() > 2) {
60 if (!info[2]->IsObject()) { 60 if (!info[2]->IsObject()) {
61 exceptionState.throwTypeError("The 3rd argument is not of type Objec t."); 61 exceptionState.throwTypeError("The 3rd argument is not of type Objec t.");
62 exceptionState.throwIfNeeded(); 62 exceptionState.throwIfNeeded();
63 return; 63 return;
64 } 64 }
65 65
66 if (!properties.parseBlobPropertyBag(info[2], "File", exceptionState, in fo.GetIsolate())) { 66 if (!properties.parseBlobPropertyBag(info.GetIsolate(), info[2], "File", exceptionState)) {
67 exceptionState.throwIfNeeded(); 67 exceptionState.throwIfNeeded();
68 return; 68 return;
69 } 69 }
70 } else { 70 } else {
71 properties.setDefaultLastModified(); 71 properties.setDefaultLastModified();
72 } 72 }
73 73
74 OwnPtr<BlobData> blobData = BlobData::create(); 74 OwnPtr<BlobData> blobData = BlobData::create();
75 blobData->setContentType(properties.contentType()); 75 blobData->setContentType(properties.contentType());
76 v8::Local<v8::Object> blobParts = v8::Local<v8::Object>::Cast(info[0]); 76 v8::Local<v8::Object> blobParts = v8::Local<v8::Object>::Cast(info[0]);
77 if (!V8BlobCustomHelpers::processBlobParts(blobParts, properties.normalizeLi neEndingsToNative(), *blobData, info.GetIsolate())) 77 if (!V8BlobCustomHelpers::processBlobParts(info.GetIsolate(), blobParts, pro perties.normalizeLineEndingsToNative(), *blobData))
78 return; 78 return;
79 79
80 long long fileSize = blobData->length(); 80 long long fileSize = blobData->length();
81 File* file = File::create(fileName, properties.lastModified(), BlobDataHandl e::create(blobData.release(), fileSize)); 81 File* file = File::create(fileName, properties.lastModified(), BlobDataHandl e::create(blobData.release(), fileSize));
82 v8SetReturnValue(info, file); 82 v8SetReturnValue(info, file);
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698