| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 29 #include "bindings/core/v8/ExceptionMessages.h" | 29 #include "bindings/core/v8/ExceptionMessages.h" |
| 30 #include "bindings/core/v8/ExceptionState.h" | 30 #include "bindings/core/v8/ExceptionState.h" |
| 31 #include "core/dom/ExceptionCode.h" | 31 #include "core/dom/ExceptionCode.h" |
| 32 #include "core/dom/ExecutionContext.h" | 32 #include "core/dom/ExecutionContext.h" |
| 33 #include "core/dom/URLSearchParams.h" | 33 #include "core/dom/URLSearchParams.h" |
| 34 #include "core/fetch/MemoryCache.h" | 34 #include "core/fetch/MemoryCache.h" |
| 35 #include "core/fileapi/Blob.h" | 35 #include "core/fileapi/Blob.h" |
| 36 #include "core/html/PublicURLManager.h" | 36 #include "core/html/PublicURLManager.h" |
| 37 #include "platform/blob/BlobURL.h" | 37 #include "platform/blob/BlobURL.h" |
| 38 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
| 39 #include "wtf/TemporaryChange.h" | 39 #include "wtf/AutoReset.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta
te) | 43 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta
te) |
| 44 { | 44 { |
| 45 if (!base.isValid()) { | 45 if (!base.isValid()) { |
| 46 exceptionState.throwTypeError("Invalid base URL"); | 46 exceptionState.throwTypeError("Invalid base URL"); |
| 47 return; | 47 return; |
| 48 } | 48 } |
| 49 | 49 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void DOMURL::update() | 113 void DOMURL::update() |
| 114 { | 114 { |
| 115 updateSearchParams(url().query()); | 115 updateSearchParams(url().query()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void DOMURL::updateSearchParams(const String& queryString) | 118 void DOMURL::updateSearchParams(const String& queryString) |
| 119 { | 119 { |
| 120 if (!m_searchParams) | 120 if (!m_searchParams) |
| 121 return; | 121 return; |
| 122 | 122 |
| 123 TemporaryChange<bool> scope(m_isInUpdate, true); | 123 AutoReset<bool> scope(&m_isInUpdate, true); |
| 124 ASSERT(m_searchParams->urlObject() == this); | 124 ASSERT(m_searchParams->urlObject() == this); |
| 125 m_searchParams->setInput(queryString); | 125 m_searchParams->setInput(queryString); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace blink | 128 } // namespace blink |
| OLD | NEW |