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

Side by Side Diff: third_party/WebKit/Source/web/WebBlob.cpp

Issue 1984593002: Remove OwnPtr::release() calls in web/ & wtf/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with trunk. Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 30 matching lines...) Expand all
41 41
42 WebBlob WebBlob::createFromUUID(const WebString& uuid, const WebString& type, lo ng long size) 42 WebBlob WebBlob::createFromUUID(const WebString& uuid, const WebString& type, lo ng long size)
43 { 43 {
44 return Blob::create(BlobDataHandle::create(uuid, type, size)); 44 return Blob::create(BlobDataHandle::create(uuid, type, size));
45 } 45 }
46 46
47 WebBlob WebBlob::createFromFile(const WebString& path, long long size) 47 WebBlob WebBlob::createFromFile(const WebString& path, long long size)
48 { 48 {
49 OwnPtr<BlobData> blobData = BlobData::create(); 49 OwnPtr<BlobData> blobData = BlobData::create();
50 blobData->appendFile(path, 0, size, invalidFileTime()); 50 blobData->appendFile(path, 0, size, invalidFileTime());
51 return Blob::create(BlobDataHandle::create(blobData.release(), size)); 51 return Blob::create(BlobDataHandle::create(std::move(blobData), size));
52 } 52 }
53 53
54 WebBlob WebBlob::fromV8Value(v8::Local<v8::Value> value) 54 WebBlob WebBlob::fromV8Value(v8::Local<v8::Value> value)
55 { 55 {
56 if (V8Blob::hasInstance(value, v8::Isolate::GetCurrent())) { 56 if (V8Blob::hasInstance(value, v8::Isolate::GetCurrent())) {
57 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); 57 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value);
58 Blob* blob = V8Blob::toImpl(object); 58 Blob* blob = V8Blob::toImpl(object);
59 DCHECK(blob); 59 DCHECK(blob);
60 return blob; 60 return blob;
61 } 61 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 { 94 {
95 } 95 }
96 96
97 WebBlob& WebBlob::operator=(Blob* blob) 97 WebBlob& WebBlob::operator=(Blob* blob)
98 { 98 {
99 m_private = blob; 99 m_private = blob;
100 return *this; 100 return *this;
101 } 101 }
102 102
103 } // namespace blink 103 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698