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