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

Side by Side Diff: Source/bindings/core/v8/custom/V8BlobCustom.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 | « no previous file | Source/bindings/core/v8/custom/V8BlobCustomHelpers.h » ('j') | 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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 V8BlobCustomHelpers::ParsedProperties properties(false); 55 V8BlobCustomHelpers::ParsedProperties properties(false);
56 if (info.Length() > 1) { 56 if (info.Length() > 1) {
57 if (!info[1]->IsObject()) { 57 if (!info[1]->IsObject()) {
58 exceptionState.throwTypeError("The 2nd argument is not of type Objec t."); 58 exceptionState.throwTypeError("The 2nd argument is not of type Objec t.");
59 exceptionState.throwIfNeeded(); 59 exceptionState.throwIfNeeded();
60 return; 60 return;
61 } 61 }
62 62
63 if (!properties.parseBlobPropertyBag(info[1], "Blob", exceptionState, in fo.GetIsolate())) { 63 if (!properties.parseBlobPropertyBag(info.GetIsolate(), info[1], "Blob", exceptionState)) {
64 exceptionState.throwIfNeeded(); 64 exceptionState.throwIfNeeded();
65 return; 65 return;
66 } 66 }
67 } 67 }
68 68
69 OwnPtr<BlobData> blobData = BlobData::create(); 69 OwnPtr<BlobData> blobData = BlobData::create();
70 blobData->setContentType(properties.contentType()); 70 blobData->setContentType(properties.contentType());
71 if (!V8BlobCustomHelpers::processBlobParts(v8::Local<v8::Object>::Cast(info[ 0]), properties.normalizeLineEndingsToNative(), *blobData, info.GetIsolate())) 71 if (!V8BlobCustomHelpers::processBlobParts(info.GetIsolate(), v8::Local<v8:: Object>::Cast(info[0]), properties.normalizeLineEndingsToNative(), *blobData))
72 return; 72 return;
73 73
74 long long blobSize = blobData->length(); 74 long long blobSize = blobData->length();
75 Blob* blob = Blob::create(BlobDataHandle::create(blobData.release(), blobSiz e)); 75 Blob* blob = Blob::create(BlobDataHandle::create(blobData.release(), blobSiz e));
76 v8SetReturnValue(info, blob); 76 v8SetReturnValue(info, blob);
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/custom/V8BlobCustomHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698