| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 String filename; | 348 String filename; |
| 349 if (!popupsAllowed) | 349 if (!popupsAllowed) |
| 350 filename = "npscript"; | 350 filename = "npscript"; |
| 351 | 351 |
| 352 Frame* frame = v8NpObject->rootObject->frame(); | 352 Frame* frame = v8NpObject->rootObject->frame(); |
| 353 ASSERT(frame); | 353 ASSERT(frame); |
| 354 | 354 |
| 355 String script = String::fromUTF8(npScript->UTF8Characters, npScript->UTF8Len
gth); | 355 String script = String::fromUTF8(npScript->UTF8Characters, npScript->UTF8Len
gth); |
| 356 | 356 |
| 357 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingNe
wUserGesture : PossiblyProcessingUserGesture); | 357 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingNe
wUserGesture : PossiblyProcessingUserGesture); |
| 358 v8::Local<v8::Value> v8result = frame->script()->compileAndRunScript(ScriptS
ourceCode(script, KURL(ParsedURLString, filename))); | 358 v8::Local<v8::Value> v8result = frame->script()->executeScriptAndReturnValue
(context, ScriptSourceCode(script, KURL(ParsedURLString, filename))); |
| 359 | 359 |
| 360 if (v8result.IsEmpty()) | 360 if (v8result.IsEmpty()) |
| 361 return false; | 361 return false; |
| 362 | 362 |
| 363 if (_NPN_IsAlive(npObject)) | 363 if (_NPN_IsAlive(npObject)) |
| 364 convertV8ObjectToNPVariant(v8result, npObject, result, isolate); | 364 convertV8ObjectToNPVariant(v8result, npObject, result, isolate); |
| 365 return true; | 365 return true; |
| 366 } | 366 } |
| 367 | 367 |
| 368 bool _NPN_GetProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName, NP
Variant* result) | 368 bool _NPN_GetProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName, NP
Variant* result) |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 605 |
| 606 convertV8ObjectToNPVariant(resultObject, npObject, result, isolate); | 606 convertV8ObjectToNPVariant(resultObject, npObject, result, isolate); |
| 607 return true; | 607 return true; |
| 608 } | 608 } |
| 609 | 609 |
| 610 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) | 610 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) |
| 611 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); | 611 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); |
| 612 | 612 |
| 613 return false; | 613 return false; |
| 614 } | 614 } |
| OLD | NEW |