I'd like you to do a code review. Please review the following patch:
----------------------------------------------------------------------
r1288: (no author) | 2010-01-11 18:11:02 +0800
Check for time change to avoid false-positive of blocked script.
----------------------------------------------------------------------
=== extensions/smjs_script_runtime/js_script_context.cc
==================================================================
--- extensions/smjs_script_runtime/js_script_context.cc (revision 1287)
+++ extensions/smjs_script_runtime/js_script_context.cc (revision 1288)
@@ -654,6 +654,16 @@
return JS_TRUE;
}
+ static uint64_t last_time = 0;
+ if (last_time != 0 &&
+ (now < last_time || now - last_time > kMaxScriptRunTime / 10)) {
+ // There must be some time change. Reset the timer.
+ last_time = now;
+ operation_callback_time_ = now;
+ return JS_TRUE;
+ }
+ last_time = now;
+
if (now > operation_callback_time_ + kMaxScriptRunTime) {
static bool handling_script_blocked_signal = false;
if (handling_script_blocked_signal) {
This is a semiautomated message from "svkmail". Complaints or suggestions?
Mail edy...@gmail.com.