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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 183253003: Consistently use ExceptionState::throwTypeError(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | Source/core/xml/DOMParser.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node* node, ExceptionState& exceptionState) 2095 void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node* node, ExceptionState& exceptionState)
2096 { 2096 {
2097 Document* document; 2097 Document* document;
2098 if (!node) { 2098 if (!node) {
2099 document = contextDocument(); 2099 document = contextDocument();
2100 } else if (node->isDocumentNode()) { 2100 } else if (node->isDocumentNode()) {
2101 document = toDocument(node); 2101 document = toDocument(node);
2102 } else if (node->hasTagName(HTMLNames::iframeTag)) { 2102 } else if (node->hasTagName(HTMLNames::iframeTag)) {
2103 document = toHTMLIFrameElement(node)->contentDocument(); 2103 document = toHTMLIFrameElement(node)->contentDocument();
2104 } else { 2104 } else {
2105 exceptionState.throwDOMException(TypeError, "The node provided is neithe r a document nor an IFrame."); 2105 exceptionState.throwTypeError("The node provided is neither a document n or an IFrame.");
2106 return; 2106 return;
2107 } 2107 }
2108 document->updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksS ynchronously); 2108 document->updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksS ynchronously);
2109 } 2109 }
2110 2110
2111 PassRefPtr<ClientRectList> Internals::draggableRegions(Document* document, Excep tionState& exceptionState) 2111 PassRefPtr<ClientRectList> Internals::draggableRegions(Document* document, Excep tionState& exceptionState)
2112 { 2112 {
2113 return annotatedRegions(document, true, exceptionState); 2113 return annotatedRegions(document, true, exceptionState);
2114 } 2114 }
2115 2115
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2381 return promise.then(AddOneFunction::create(context)); 2381 return promise.then(AddOneFunction::create(context));
2382 } 2382 }
2383 2383
2384 void Internals::trace(Visitor* visitor) 2384 void Internals::trace(Visitor* visitor)
2385 { 2385 {
2386 visitor->trace(m_runtimeFlags); 2386 visitor->trace(m_runtimeFlags);
2387 visitor->trace(m_profilers); 2387 visitor->trace(m_profilers);
2388 } 2388 }
2389 2389
2390 } 2390 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | Source/core/xml/DOMParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698