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

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

Issue 23477075: Rename isolateFor*() utility functions to toIsolate() (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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (context->isDocument() && !toDocument(context)->allowInlineEventHandlers( m_node, this, m_sourceURL, m_position.m_line)) { 113 if (context->isDocument() && !toDocument(context)->allowInlineEventHandlers( m_node, this, m_sourceURL, m_position.m_line)) {
114 clearListenerObject(); 114 clearListenerObject();
115 return; 115 return;
116 } 116 }
117 117
118 if (hasExistingListenerObject()) 118 if (hasExistingListenerObject())
119 return; 119 return;
120 120
121 ASSERT(context->isDocument()); 121 ASSERT(context->isDocument());
122 122
123 v8::Isolate* isolate = isolateForScriptExecutionContext(context); 123 v8::Isolate* isolate = toIsolate(context);
124 v8::HandleScope handleScope(isolate); 124 v8::HandleScope handleScope(isolate);
125 125
126 // Use the outer scope to hold context. 126 // Use the outer scope to hold context.
127 v8::Local<v8::Context> v8Context = toV8Context(context, world()); 127 v8::Local<v8::Context> v8Context = toV8Context(context, world());
128 // Bail out if we cannot get the context. 128 // Bail out if we cannot get the context.
129 if (v8Context.IsEmpty()) 129 if (v8Context.IsEmpty())
130 return; 130 return;
131 131
132 v8::Context::Scope scope(v8Context); 132 v8::Context::Scope scope(v8Context);
133 133
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // // Since we only parse once, there's no need to keep data used for parsin g around anymore. 225 // // Since we only parse once, there's no need to keep data used for parsin g around anymore.
226 // m_functionName = String(); 226 // m_functionName = String();
227 // m_code = String(); 227 // m_code = String();
228 // m_eventParameterName = String(); 228 // m_eventParameterName = String();
229 // m_sourceURL = String(); 229 // m_sourceURL = String();
230 230
231 setListenerObject(wrappedFunction); 231 setListenerObject(wrappedFunction);
232 } 232 }
233 233
234 } // namespace WebCore 234 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp ('k') | Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698