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