| OLD | NEW |
| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 v8::Context::Scope contextScope(context); | 148 v8::Context::Scope contextScope(context); |
| 149 v8::Handle<v8::Object> object = v8Listener->getListenerObject(document); | 149 v8::Handle<v8::Object> object = v8Listener->getListenerObject(document); |
| 150 if (object.IsEmpty() || !object->IsFunction()) | 150 if (object.IsEmpty() || !object->IsFunction()) |
| 151 return false; | 151 return false; |
| 152 | 152 |
| 153 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(object); | 153 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(object); |
| 154 int scriptIdValue = function->ScriptId(); | 154 int scriptIdValue = function->ScriptId(); |
| 155 scriptId = String::number(scriptIdValue); | 155 scriptId = String::number(scriptIdValue); |
| 156 v8::ScriptOrigin origin = function->GetScriptOrigin(); | 156 v8::ScriptOrigin origin = function->GetScriptOrigin(); |
| 157 if (!origin.ResourceName().IsEmpty() && origin.ResourceName()->IsString()) | 157 if (!origin.ResourceName().IsEmpty() && origin.ResourceName()->IsString()) |
| 158 sourceName = toWebCoreString(origin.ResourceName().As<v8::String>()); | 158 sourceName = toCoreString(origin.ResourceName().As<v8::String>()); |
| 159 else | 159 else |
| 160 sourceName = ""; | 160 sourceName = ""; |
| 161 lineNumber = function->GetScriptLineNumber(); | 161 lineNumber = function->GetScriptLineNumber(); |
| 162 return true; | 162 return true; |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace WebCore | 165 } // namespace WebCore |
| OLD | NEW |