| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 // as a browser initiated event. Instead, we want it to look as if the page | 418 // as a browser initiated event. Instead, we want it to look as if the page |
| 419 // initiated any load resulting from JS execution. | 419 // initiated any load resulting from JS execution. |
| 420 return pending && | 420 return pending && |
| 421 !pending->common_params.url.SchemeIs(url::kJavaScriptScheme); | 421 !pending->common_params.url.SchemeIs(url::kJavaScriptScheme); |
| 422 } | 422 } |
| 423 | 423 |
| 424 NOINLINE void ExhaustMemory() { | 424 NOINLINE void ExhaustMemory() { |
| 425 volatile void* ptr = nullptr; | 425 volatile void* ptr = nullptr; |
| 426 do { | 426 do { |
| 427 ptr = malloc(0x10000000); | 427 ptr = malloc(0x10000000); |
| 428 base::debug::Alias(&ptr); |
| 428 } while (ptr); | 429 } while (ptr); |
| 429 } | 430 } |
| 430 | 431 |
| 431 NOINLINE void CrashIntentionally() { | 432 NOINLINE void CrashIntentionally() { |
| 432 // NOTE(shess): Crash directly rather than using NOTREACHED() so | 433 // NOTE(shess): Crash directly rather than using NOTREACHED() so |
| 433 // that the signature is easier to triage in crash reports. | 434 // that the signature is easier to triage in crash reports. |
| 434 // | 435 // |
| 435 // Linker's ICF feature may merge this function with other functions with the | 436 // Linker's ICF feature may merge this function with other functions with the |
| 436 // same definition and it may confuse the crash report processing system. | 437 // same definition and it may confuse the crash report processing system. |
| 437 static int static_variable_to_make_this_function_unique = 0; | 438 static int static_variable_to_make_this_function_unique = 0; |
| (...skipping 6390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6828 // event target. Potentially a Pepper plugin will receive the event. | 6829 // event target. Potentially a Pepper plugin will receive the event. |
| 6829 // In order to tell whether a plugin gets the last mouse event and which it | 6830 // In order to tell whether a plugin gets the last mouse event and which it |
| 6830 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6831 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6831 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6832 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6832 // |pepper_last_mouse_event_target_|. | 6833 // |pepper_last_mouse_event_target_|. |
| 6833 pepper_last_mouse_event_target_ = nullptr; | 6834 pepper_last_mouse_event_target_ = nullptr; |
| 6834 #endif | 6835 #endif |
| 6835 } | 6836 } |
| 6836 | 6837 |
| 6837 } // namespace content | 6838 } // namespace content |
| OLD | NEW |