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

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

Issue 24118003: Pass isolate to v8::Undefined() function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/SerializedScriptValue.cpp ('k') | Source/bindings/v8/V8Binding.h » ('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) 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
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
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
OLDNEW
« no previous file with comments | « Source/bindings/v8/SerializedScriptValue.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698