| Index: webkit/chaos/V8CustomChaosPositionCallback.cpp | 
| =================================================================== | 
| --- webkit/chaos/V8CustomChaosPositionCallback.cpp	(revision 0) | 
| +++ webkit/chaos/V8CustomChaosPositionCallback.cpp	(revision 0) | 
| @@ -0,0 +1,35 @@ | 
| +#include "config.h" | 
| + | 
| +#include "V8CustomChaosPositionCallback.h" | 
| +#include "V8CustomVoidCallback.h" | 
| +#include "V8Index.h" | 
| +#include "V8Proxy.h" | 
| + | 
| +#include "Frame.h" | 
| + | 
| +namespace WebCore { | 
| + | 
| +V8CustomChaosPositionCallback::V8CustomChaosPositionCallback(Frame *frame, v8::Local<v8::Object> callback) | 
| +    : callback_(v8::Persistent<v8::Object>::New(callback)), frame_(frame) { | 
| +} | 
| + | 
| +void V8CustomChaosPositionCallback::handleEvent(ChaosGeoposition* position) { | 
| +  // Boilerplate lifted from V8CustomSQLTransactionCallback.cpp | 
| +  v8::HandleScope handleScope; | 
| + | 
| +  v8::Handle<v8::Context> context = V8Proxy::context(frame_.get()); | 
| +  if (context.IsEmpty()) | 
| +    return; | 
| + | 
| +  v8::Context::Scope scope(context); | 
| +  // end of boilerplate | 
| + | 
| +  v8::Handle<v8::Value> argv[] = { | 
| +    V8DOMWrapper::convertToV8Object(V8ClassIndex::CHAOSGEOPOSITION, position) | 
| +  }; | 
| +  bool callbackReturnValue = false; | 
| +  bool raisedException | 
| +      = invokeCallback(callback_, 1, argv, callbackReturnValue); | 
| +} | 
| + | 
| +} // namespace WebCore | 
|  | 
| Property changes on: webkit/chaos/V8CustomChaosPositionCallback.cpp | 
| ___________________________________________________________________ | 
| Added: svn:eol-style | 
| + LF | 
|  | 
|  |