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

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

Issue 234403004: Rename V8TRYCATCH_* macros in v8/V8BindingMacros.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: BOOL*_BOOL -> BOOL* Created 6 years, 8 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/ScriptController.cpp ('k') | Source/bindings/v8/ScriptValue.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>( listener); 121 V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>( listener);
122 v8::Handle<v8::Context> context = toV8Context(document, v8Listener->world()) ; 122 v8::Handle<v8::Context> context = toV8Context(document, v8Listener->world()) ;
123 v8::Context::Scope contextScope(context); 123 v8::Context::Scope contextScope(context);
124 v8::Handle<v8::Object> object = v8Listener->getListenerObject(document); 124 v8::Handle<v8::Object> object = v8Listener->getListenerObject(document);
125 if (object.IsEmpty()) 125 if (object.IsEmpty())
126 return ""; 126 return "";
127 v8::Handle<v8::Function> function = eventListenerEffectiveFunction(scope.Get Isolate(), object); 127 v8::Handle<v8::Function> function = eventListenerEffectiveFunction(scope.Get Isolate(), object);
128 if (function.IsEmpty()) 128 if (function.IsEmpty())
129 return ""; 129 return "";
130 130
131 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<WithNullCheck>, func tionString, function, ""); 131 TOSTRING_BOOL(V8StringResource<WithNullCheck>, functionString, function, "") ;
132 return functionString; 132 return functionString;
133 } 133 }
134 134
135 ScriptValue eventListenerHandler(Document* document, EventListener* listener) 135 ScriptValue eventListenerHandler(Document* document, EventListener* listener)
136 { 136 {
137 if (listener->type() != EventListener::JSEventListenerType) 137 if (listener->type() != EventListener::JSEventListenerType)
138 return ScriptValue(); 138 return ScriptValue();
139 139
140 v8::Isolate* isolate = toIsolate(document); 140 v8::Isolate* isolate = toIsolate(document);
141 v8::HandleScope scope(isolate); 141 v8::HandleScope scope(isolate);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 v8::ScriptOrigin origin = originalFunction->GetScriptOrigin(); 179 v8::ScriptOrigin origin = originalFunction->GetScriptOrigin();
180 if (!origin.ResourceName().IsEmpty() && origin.ResourceName()->IsString()) 180 if (!origin.ResourceName().IsEmpty() && origin.ResourceName()->IsString())
181 sourceName = toCoreString(origin.ResourceName().As<v8::String>()); 181 sourceName = toCoreString(origin.ResourceName().As<v8::String>());
182 else 182 else
183 sourceName = ""; 183 sourceName = "";
184 lineNumber = originalFunction->GetScriptLineNumber(); 184 lineNumber = originalFunction->GetScriptLineNumber();
185 return true; 185 return true;
186 } 186 }
187 187
188 } // namespace WebCore 188 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptController.cpp ('k') | Source/bindings/v8/ScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698