OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 } | 540 } |
541 } else if (url == kChromeUIShorthangURL) { | 541 } else if (url == kChromeUIShorthangURL) { |
542 LOG(ERROR) << "Intentionally sleeping renderer for 20 seconds" | 542 LOG(ERROR) << "Intentionally sleeping renderer for 20 seconds" |
543 << " because user navigated to " << url.spec(); | 543 << " because user navigated to " << url.spec(); |
544 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); | 544 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); |
545 } else if (url == kChromeUIMemoryExhaustURL) { | 545 } else if (url == kChromeUIMemoryExhaustURL) { |
546 LOG(ERROR) | 546 LOG(ERROR) |
547 << "Intentionally exhausting renderer memory because user navigated to " | 547 << "Intentionally exhausting renderer memory because user navigated to " |
548 << url.spec(); | 548 << url.spec(); |
549 ExhaustMemory(); | 549 ExhaustMemory(); |
| 550 } else if (url == kChromeUICheckCrashURL) { |
| 551 LOG(ERROR) |
| 552 << "Intentionally causing CHECK because user navigated to " |
| 553 << url.spec(); |
| 554 CHECK(false); |
550 } | 555 } |
551 | 556 |
552 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) | 557 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) |
553 MaybeTriggerAsanError(url); | 558 MaybeTriggerAsanError(url); |
554 #endif // ADDRESS_SANITIZER || SYZYASAN | 559 #endif // ADDRESS_SANITIZER || SYZYASAN |
555 } | 560 } |
556 | 561 |
557 // Returns false unless this is a top-level navigation. | 562 // Returns false unless this is a top-level navigation. |
558 bool IsTopLevelNavigation(WebFrame* frame) { | 563 bool IsTopLevelNavigation(WebFrame* frame) { |
559 return frame->parent() == NULL; | 564 return frame->parent() == NULL; |
(...skipping 6290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6850 // event target. Potentially a Pepper plugin will receive the event. | 6855 // event target. Potentially a Pepper plugin will receive the event. |
6851 // In order to tell whether a plugin gets the last mouse event and which it | 6856 // In order to tell whether a plugin gets the last mouse event and which it |
6852 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6857 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6853 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6858 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6854 // |pepper_last_mouse_event_target_|. | 6859 // |pepper_last_mouse_event_target_|. |
6855 pepper_last_mouse_event_target_ = nullptr; | 6860 pepper_last_mouse_event_target_ = nullptr; |
6856 #endif | 6861 #endif |
6857 } | 6862 } |
6858 | 6863 |
6859 } // namespace content | 6864 } // namespace content |
OLD | NEW |