OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 22 matching lines...) Expand all Loading... | |
33 | 33 |
34 #include "RuntimeEnabledFeatures.h" | 34 #include "RuntimeEnabledFeatures.h" |
35 #include "bindings/v8/V8Binding.h" | 35 #include "bindings/v8/V8Binding.h" |
36 #include "bindings/v8/V8HiddenPropertyName.h" | 36 #include "bindings/v8/V8HiddenPropertyName.h" |
37 #include "bindings/v8/V8ScriptRunner.h" | 37 #include "bindings/v8/V8ScriptRunner.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 DateExtension* DateExtension::extension; | 41 DateExtension* DateExtension::extension; |
42 | 42 |
43 static const char* dateExtensionName = "v8/DateExtension"; | 43 static const char dateExtensionName[] = "v8/DateExtension"; |
44 static const char* dateExtensionScript = | 44 static const char dateExtensionScript[] = |
abarth-chromium
2013/10/29 05:21:15
This code is about to be deleted.
| |
45 "(function () {" | 45 "(function () {" |
46 " var counter;" | 46 " var counter;" |
47 " var orig_getTime;" | 47 " var orig_getTime;" |
48 " function getTimeOverride() {" | 48 " function getTimeOverride() {" |
49 " if (++counter > 1000)" | 49 " if (++counter > 1000)" |
50 " OnSleepDetected();" | 50 " OnSleepDetected();" |
51 " return orig_getTime.call(this);" | 51 " return orig_getTime.call(this);" |
52 " };" | 52 " };" |
53 " function enableSleepDetection(enable) {" | 53 " function enableSleepDetection(enable) {" |
54 " if (enable) {" | 54 " if (enable) {" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 dateObject->SetHiddenValue(V8HiddenPropertyName::sleepFunction(args.GetIsola te()), enableSleepDetectionFunction); | 117 dateObject->SetHiddenValue(V8HiddenPropertyName::sleepFunction(args.GetIsola te()), enableSleepDetectionFunction); |
118 return; | 118 return; |
119 } | 119 } |
120 | 120 |
121 void DateExtension::OnSleepDetected(const v8::FunctionCallbackInfo<v8::Value>& a rgs) | 121 void DateExtension::OnSleepDetected(const v8::FunctionCallbackInfo<v8::Value>& a rgs) |
122 { | 122 { |
123 throwError(v8GeneralError, "Too much time spent in unload handler.", args.Ge tIsolate()); | 123 throwError(v8GeneralError, "Too much time spent in unload handler.", args.Ge tIsolate()); |
124 } | 124 } |
125 | 125 |
126 } // namespace WebCore | 126 } // namespace WebCore |
OLD | NEW |