OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 String filename; | 326 String filename; |
327 if (!popupsAllowed) | 327 if (!popupsAllowed) |
328 filename = "npscript"; | 328 filename = "npscript"; |
329 | 329 |
330 V8NPObject* v8NpObject = reinterpret_cast<V8NPObject*>(npObject); | 330 V8NPObject* v8NpObject = reinterpret_cast<V8NPObject*>(npObject); |
331 Frame* frame = v8NpObject->rootObject->frame(); | 331 Frame* frame = v8NpObject->rootObject->frame(); |
332 ASSERT(frame); | 332 ASSERT(frame); |
333 | 333 |
334 String script = String::fromUTF8(npScript->UTF8Characters, npScript->UTF8Len
gth); | 334 String script = String::fromUTF8(npScript->UTF8Characters, npScript->UTF8Len
gth); |
335 | 335 |
336 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingUs
erGesture : PossiblyProcessingUserGesture); | 336 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingNe
wUserGesture : PossiblyProcessingUserGesture); |
337 v8::Local<v8::Value> v8result = frame->script()->compileAndRunScript(ScriptS
ourceCode(script, KURL(ParsedURLString, filename))); | 337 v8::Local<v8::Value> v8result = frame->script()->compileAndRunScript(ScriptS
ourceCode(script, KURL(ParsedURLString, filename))); |
338 | 338 |
339 if (v8result.IsEmpty()) | 339 if (v8result.IsEmpty()) |
340 return false; | 340 return false; |
341 | 341 |
342 if (_NPN_IsAlive(npObject)) | 342 if (_NPN_IsAlive(npObject)) |
343 convertV8ObjectToNPVariant(v8result, npObject, result); | 343 convertV8ObjectToNPVariant(v8result, npObject, result); |
344 return true; | 344 return true; |
345 } | 345 } |
346 | 346 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 | 588 |
589 convertV8ObjectToNPVariant(resultObject, npObject, result); | 589 convertV8ObjectToNPVariant(resultObject, npObject, result); |
590 return true; | 590 return true; |
591 } | 591 } |
592 | 592 |
593 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) | 593 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) |
594 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); | 594 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); |
595 | 595 |
596 return false; | 596 return false; |
597 } | 597 } |
OLD | NEW |