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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMURL.cpp

Issue 1492093002: Drop [LegacyInterfaceTypeChecking] for URL.createObjectURL(blob) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests Created 5 years 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 * Copyright (C) 2012 Motorola Mobility Inc. 3 * Copyright (C) 2012 Motorola Mobility Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 m_url = url; 57 m_url = url;
58 m_input = String(); 58 m_input = String();
59 } else { 59 } else {
60 m_url = KURL(); 60 m_url = KURL();
61 m_input = value; 61 m_input = value;
62 } 62 }
63 } 63 }
64 64
65 String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, E xceptionState& exceptionState) 65 String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, E xceptionState& exceptionState)
66 { 66 {
67 if (!executionContext || !blob) 67 ASSERT(blob);
68 if (!executionContext)
68 return String(); 69 return String();
69 if (blob->hasBeenClosed()) { 70 if (blob->hasBeenClosed()) {
70 exceptionState.throwDOMException(InvalidStateError, String(blob->isFile( ) ? "File" : "Blob") + " has been closed."); 71 exceptionState.throwDOMException(InvalidStateError, String(blob->isFile( ) ? "File" : "Blob") + " has been closed.");
71 return String(); 72 return String();
72 } 73 }
73 return createPublicURL(executionContext, blob, blob->uuid()); 74 return createPublicURL(executionContext, blob, blob->uuid());
74 } 75 }
75 76
76 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl e* registrable, const String& uuid) 77 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl e* registrable, const String& uuid)
77 { 78 {
(...skipping 18 matching lines...) Expand all
96 97
97 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& uuid) 98 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& uuid)
98 { 99 {
99 if (!executionContext) 100 if (!executionContext)
100 return; 101 return;
101 102
102 executionContext->publicURLManager().revoke(uuid); 103 executionContext->publicURLManager().revoke(uuid);
103 } 104 }
104 105
105 } // namespace blink 106 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698