Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/bindings/v8/DateExtension.cpp

Issue 49093004: Move more arrays of strings to shareable memory (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSDefaultStyleSheets.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSDefaultStyleSheets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698