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

Side by Side Diff: sky/engine/core/dom/DOMURL.cpp

Issue 706123005: Remove nop ScriptWrappable::init calls (Closed) Base URL: git@github.com:domokit/mojo.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 | « sky/engine/core/dom/DOMTokenList.h ('k') | sky/engine/core/dom/Document.cpp » ('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) 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 20 matching lines...) Expand all
31 #include "bindings/core/v8/ExceptionState.h" 31 #include "bindings/core/v8/ExceptionState.h"
32 #include "core/dom/ExceptionCode.h" 32 #include "core/dom/ExceptionCode.h"
33 #include "core/dom/ExecutionContext.h" 33 #include "core/dom/ExecutionContext.h"
34 #include "core/fetch/MemoryCache.h" 34 #include "core/fetch/MemoryCache.h"
35 #include "wtf/MainThread.h" 35 #include "wtf/MainThread.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te) 39 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te)
40 { 40 {
41 ScriptWrappable::init(this);
42 if (!base.isValid()) 41 if (!base.isValid())
43 exceptionState.throwDOMException(SyntaxError, "Invalid base URL"); 42 exceptionState.throwDOMException(SyntaxError, "Invalid base URL");
44 43
45 m_url = KURL(base, url); 44 m_url = KURL(base, url);
46 if (!m_url.isValid()) 45 if (!m_url.isValid())
47 exceptionState.throwDOMException(SyntaxError, "Invalid URL"); 46 exceptionState.throwDOMException(SyntaxError, "Invalid URL");
48 } 47 }
49 48
50 void DOMURL::setInput(const String& value) 49 void DOMURL::setInput(const String& value)
51 { 50 {
52 KURL url(blankURL(), value); 51 KURL url(blankURL(), value);
53 if (url.isValid()) { 52 if (url.isValid()) {
54 m_url = url; 53 m_url = url;
55 m_input = String(); 54 m_input = String();
56 } else { 55 } else {
57 m_url = KURL(); 56 m_url = KURL();
58 m_input = value; 57 m_input = value;
59 } 58 }
60 } 59 }
61 60
62 } // namespace blink 61 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/DOMTokenList.h ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698