| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 if (!tryCatch.CanContinue()) { // Result of TerminateExecution(). | 136 if (!tryCatch.CanContinue()) { // Result of TerminateExecution(). |
| 137 if (context->isWorkerGlobalScope()) | 137 if (context->isWorkerGlobalScope()) |
| 138 toWorkerGlobalScope(context)->script()->forbidExecution(); | 138 toWorkerGlobalScope(context)->script()->forbidExecution(); |
| 139 return; | 139 return; |
| 140 } | 140 } |
| 141 tryCatch.Reset(); | 141 tryCatch.Reset(); |
| 142 | 142 |
| 143 // Restore the old event. This must be done for all exit paths through t
his method. | 143 // Restore the old event. This must be done for all exit paths through t
his method. |
| 144 if (savedEvent.IsEmpty()) | 144 if (savedEvent.IsEmpty()) |
| 145 v8Context->Global()->SetHiddenValue(eventSymbol, v8::Undefined()); | 145 v8Context->Global()->SetHiddenValue(eventSymbol, v8::Undefined(v8Con
text->GetIsolate())); |
| 146 else | 146 else |
| 147 v8Context->Global()->SetHiddenValue(eventSymbol, savedEvent); | 147 v8Context->Global()->SetHiddenValue(eventSymbol, savedEvent); |
| 148 tryCatch.Reset(); | 148 tryCatch.Reset(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 if (event->type() == eventNames().beforeunloadEvent || event->type() == even
tNames().unloadEvent) | 151 if (event->type() == eventNames().beforeunloadEvent || event->type() == even
tNames().unloadEvent) |
| 152 DateExtension::get()->setAllowSleep(true, v8Context->GetIsolate()); | 152 DateExtension::get()->setAllowSleep(true, v8Context->GetIsolate()); |
| 153 | 153 |
| 154 ASSERT(!handleOutOfMemory() || returnValue.IsEmpty()); | 154 ASSERT(!handleOutOfMemory() || returnValue.IsEmpty()); |
| 155 | 155 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 185 return v8::Local<v8::Object>(); | 185 return v8::Local<v8::Object>(); |
| 186 return v8::Local<v8::Object>::New(v8::Handle<v8::Object>::Cast(value)); | 186 return v8::Local<v8::Object>::New(v8::Handle<v8::Object>::Cast(value)); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void V8AbstractEventListener::makeWeakCallback(v8::Isolate*, v8::Persistent<v8::
Object>*, V8AbstractEventListener* listener) | 189 void V8AbstractEventListener::makeWeakCallback(v8::Isolate*, v8::Persistent<v8::
Object>*, V8AbstractEventListener* listener) |
| 190 { | 190 { |
| 191 listener->m_listener.clear(); | 191 listener->m_listener.clear(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace WebCore | 194 } // namespace WebCore |
| OLD | NEW |