diff options
author | Steve Block <steveblock@google.com> | 2010-08-24 07:50:47 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-24 07:50:47 -0700 |
commit | c570a147a94b126d4172c30914f53dea17b4c8f5 (patch) | |
tree | 99c11741887d21f65d67c5bbdab58b7ba2a5d4d5 /WebCore/bridge/objc | |
parent | c952714bc6809a5ad081baaf9fcc04107b92ea3f (diff) | |
parent | 6c65f16005b91786c2b7c0791b9ea1dd684d57f4 (diff) | |
download | external_webkit-c570a147a94b126d4172c30914f53dea17b4c8f5.zip external_webkit-c570a147a94b126d4172c30914f53dea17b4c8f5.tar.gz external_webkit-c570a147a94b126d4172c30914f53dea17b4c8f5.tar.bz2 |
Merge changes I2e7e2317,Ie6ccde3a,I3e89f231,Id06ff339,I268dfe7d,Icaf70d9f,Ie234f1a0,Iff5c7aaa,I69b75bf0,Ifbf384f4
* changes:
Merge WebKit at r65615 : Update WebKit revision number
Merge WebKit at r65615 : Ignore http/tests/appcache/origin-quota.html
Merge WebKit at r65615 : Android-specific results for Geolocation tests.
Merge WebKit at r65615 : Fix GraphicsContext and ImageBuffer.
Merge WebKit at r65615 : processingUserGesture() is now static.
Merge WebKit at r65615 : UTF8String() becomes utf8().
Merge WebKit at r65615 : Fix include paths for string headers.
Merge WebKit at r65615 : Fix Makefiles.
Merge WebKit at r65615 : Fix conflicts.
Merge WebKit at r65615 : Initial merge by git.
Diffstat (limited to 'WebCore/bridge/objc')
-rw-r--r-- | WebCore/bridge/objc/objc_class.mm | 14 | ||||
-rw-r--r-- | WebCore/bridge/objc/objc_instance.mm | 4 | ||||
-rw-r--r-- | WebCore/bridge/objc/objc_runtime.mm | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/WebCore/bridge/objc/objc_class.mm b/WebCore/bridge/objc/objc_class.mm index 62f0a34..2d29499 100644 --- a/WebCore/bridge/objc/objc_class.mm +++ b/WebCore/bridge/objc/objc_class.mm @@ -78,11 +78,11 @@ MethodList ObjcClass::methodsNamed(const Identifier& identifier, Instance*) cons MethodList methodList; char fixedSizeBuffer[1024]; char* buffer = fixedSizeBuffer; - const char* JSName = identifier.ascii(); - if (!convertJSMethodNameToObjc(JSName, buffer, sizeof(fixedSizeBuffer))) { - int length = strlen(JSName) + 1; + CString jsName = identifier.ascii(); + if (!convertJSMethodNameToObjc(jsName.data(), buffer, sizeof(fixedSizeBuffer))) { + int length = jsName.length() + 1; buffer = new char[length]; - if (!buffer || !convertJSMethodNameToObjc(JSName, buffer, length)) + if (!buffer || !convertJSMethodNameToObjc(jsName.data(), buffer, length)) return methodList; } @@ -153,8 +153,8 @@ Field* ObjcClass::fieldNamed(const Identifier& identifier, Instance* instance) c { ClassStructPtr thisClass = _isa; - const char* name = identifier.ascii(); - RetainPtr<CFStringRef> fieldName(AdoptCF, CFStringCreateWithCString(NULL, name, kCFStringEncodingASCII)); + CString jsName = identifier.ascii(); + RetainPtr<CFStringRef> fieldName(AdoptCF, CFStringCreateWithCString(NULL, jsName.data(), kCFStringEncodingASCII)); Field* aField = (Field*)CFDictionaryGetValue(_fields.get(), fieldName.get()); if (aField) return aField; @@ -220,7 +220,7 @@ Field* ObjcClass::fieldNamed(const Identifier& identifier, Instance* instance) c if ([thisClass respondsToSelector:@selector(webScriptNameForKey:)]) mappedName = [thisClass webScriptNameForKey:objcIvarName]; - if ((mappedName && [mappedName isEqual:(NSString*)fieldName.get()]) || strcmp(objcIvarName, name) == 0) { + if ((mappedName && [mappedName isEqual:(NSString*)fieldName.get()]) || strcmp(objcIvarName, jsName.data()) == 0) { aField = new ObjcField(objcIVar); // deleted when the dictionary is destroyed CFDictionaryAddValue(_fields.get(), fieldName.get(), aField); break; diff --git a/WebCore/bridge/objc/objc_instance.mm b/WebCore/bridge/objc/objc_instance.mm index 2b518b1..6c56458 100644 --- a/WebCore/bridge/objc/objc_instance.mm +++ b/WebCore/bridge/objc/objc_instance.mm @@ -391,7 +391,7 @@ bool ObjcInstance::setValueOfUndefinedField(ExecState* exec, const Identifier& p ObjcValue objcValue = convertValueToObjcValue(exec, aValue, ObjcObjectType); @try { - [targetObject setValue:objcValue.objectValue forUndefinedKey:[NSString stringWithCString:property.ascii() encoding:NSASCIIStringEncoding]]; + [targetObject setValue:objcValue.objectValue forUndefinedKey:[NSString stringWithCString:property.ascii().data() encoding:NSASCIIStringEncoding]]; } @catch(NSException* localException) { // Do nothing. Class did not override valueForUndefinedKey:. } @@ -417,7 +417,7 @@ JSValue ObjcInstance::getValueOfUndefinedField(ExecState* exec, const Identifier setGlobalException(nil); @try { - id objcValue = [targetObject valueForUndefinedKey:[NSString stringWithCString:property.ascii() encoding:NSASCIIStringEncoding]]; + id objcValue = [targetObject valueForUndefinedKey:[NSString stringWithCString:property.ascii().data() encoding:NSASCIIStringEncoding]]; result = convertObjcValueToValue(exec, &objcValue, ObjcObjectType, m_rootObject.get()); } @catch(NSException* localException) { // Do nothing. Class did not override valueForUndefinedKey:. diff --git a/WebCore/bridge/objc/objc_runtime.mm b/WebCore/bridge/objc/objc_runtime.mm index e86cb1e..3c4ba23 100644 --- a/WebCore/bridge/objc/objc_runtime.mm +++ b/WebCore/bridge/objc/objc_runtime.mm @@ -237,7 +237,7 @@ static EncodedJSValue JSC_HOST_CALL callObjCFallbackObject(ExecState* exec) ObjcClass* objcClass = static_cast<ObjcClass*>(objcInstance->getClass()); OwnPtr<ObjcMethod> fallbackMethod(new ObjcMethod(objcClass->isa(), @selector(invokeUndefinedMethodFromWebScript:withArguments:))); const Identifier& nameIdentifier = static_cast<ObjcFallbackObjectImp*>(exec->callee())->propertyName(); - RetainPtr<CFStringRef> name(AdoptCF, CFStringCreateWithCharacters(0, nameIdentifier.data(), nameIdentifier.size())); + RetainPtr<CFStringRef> name(AdoptCF, CFStringCreateWithCharacters(0, nameIdentifier.characters(), nameIdentifier.length())); fallbackMethod->setJavaScriptName(name.get()); result = objcInstance->invokeObjcMethod(exec, fallbackMethod.get()); } |