Chromium Code Reviews| Index: Source/bindings/v8/V8LazyEventListener.cpp |
| diff --git a/Source/bindings/v8/V8LazyEventListener.cpp b/Source/bindings/v8/V8LazyEventListener.cpp |
| index f706d31485fe2fa2b51a67a038b788ad050e8cc5..d255c6166961a06f5ffef9b874028560e7edd88c 100644 |
| --- a/Source/bindings/v8/V8LazyEventListener.cpp |
| +++ b/Source/bindings/v8/V8LazyEventListener.cpp |
| @@ -135,6 +135,7 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context) |
| return; |
| v8::Context::Scope scope(v8Context); |
| + String listenerSource = frame->script()->preprocess(m_code, m_functionName); |
|
pfeldman
2013/07/22 18:33:05
That's not the way inspector is typically handling
johnjbarton
2013/07/22 18:45:33
Can you point me to an example that might be simil
pfeldman
2013/07/23 07:51:06
Sure. You should not have extracted preprocessor a
|
| // FIXME: Remove the following 'with' hack. |
| // |
| @@ -158,7 +159,7 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context) |
| "with (this[1]) {" |
| "with (this[0]) {" |
| "return function(" + m_eventParameterName + ") {" + |
| - m_code + "\n" // Insert '\n' otherwise //-style comments could break the handler. |
| + listenerSource + "\n" // Insert '\n' otherwise //-style comments could break the handler. |
| "};" |
| "}}}})"; |